def SieveOfEratosthenes(n):
    is_prime = [True]*(n-1)
    p = 2
    while True:
        multiplier=2
        multiple=p*multiplier

        while multiple<=n:
            is_prime[multiple-2]=False
            multiplier+=1
            multiple=p*multiplier

        for i, prime in enumerate(is_prime):
            if prime and i+2>p:
                p=i+2
                break
        else:
            break

    for i, prime in enumerate(is_prime):
        if prime: print(i+2)

SieveOfEratosthenes(100)