def m():
n=1
while True:
n=n+2
yield n
def _not_divisible(n):
def fn(x):
return x%n>0
return fn
def primes():
yield 2
it = m()
while True:
n =next(it)
yield n
it=filter(_not_divisible(n),it)
for nin primes():
if n<100:
print(n)
else:
break
def m():
n=1
while True:
n=n+2
yield n
def _not_divisible(n):
def fn(x):
return x%n>0
return fn
def primes():
yield 2
it = m()
while True:
n =next(it)
yield n
it=filter(_not_divisible(n),it)
for nin primes():
if n<100:
print(n)
else:
break