while True:
try:
a, b = [int(i) for i in input().split()]
n = 0
for t in range(a, b+1):
check = True
for i in range(2, t):
if t%i == 0:
check = False
if check: n += 1
print(n)
except:
break
while True:
try:
a, b = [int(i) for i in input().split()]
n = 0
for t in range(a, b+1):
check = True
for i in range(2, t):
if t%i == 0:
check = False
if check: n += 1
print(n)
except:
break
建表