Imports System.console
Public Module Module1
Public Sub Main()
Dim a, b, brojacprostih As Integer
a = ReadLine()
b = ReadLine()
For i = a To b
For j = 2 To (i - 1)
If i Mod j <> 0 Then brojacprostih = brojacprostih + 1
If brojacprostih = i - 2 Then WriteLine(i)
Next
brojacprostih = 0
End Sub
End Module