n, m = int(input()), int(input())
res = []
for i in range(n, m + 1):
for j in range(2, i):
if not i % j:
break
else:
res.append(i)
print(*res)
def prime_number(num: int) -> bool:
if num == 1:
return True
elif num > 1:
for i in range(2, num):
if (num % i) == 0:
return False
start, end = int(input()), int(input())
for i in range(start, end):
if not prime_number(i):
print(i)
n, m = int(input()), int(input())
res = []
for i in range(n, m + 1):
for j in range(2, i):
if not i % j:
break
else:
res.append(i)
print(*res)
def prime_number(num: int) -> bool:
if num == 1:
return True
elif num > 1:
for i in range(2, num):
if (num % i) == 0:
return True
return False
start, end = int(input()), int(input())
for i in range(start, end):
if not prime_number(i):
print(i)