def Sieve_of_Eratosthenes(n):
    prime = [True for i in range(n+1)]
    p = 2
    while p <= n:
        if prime[p] == True:
            for i in range(p*2, n+1, p):
                prime[i] = False
        p += 1

    prime[0] = False
    prime[1] = False
    for i in range(n+1):
        if prime[i]:
            print(i, end=" ")


a = int(input("Upto How Many Terms: "))
Sieve_of_Eratosthenes(a)

e59725e79c544181fdf2ba814821701a24aab43d
<mask token>

def Sieve_of_Eratosthenes(n):
    prime = [(True) for i in range(n + 1)]
    p = 2
    while p <= n:
        if prime[p] == True:
            for i in range(p * 2, n + 1, p):
                prime[i] = False
        p += 1
    prime[0] = False
    prime[1] = False
    for i in range(n + 1):
        if prime[i]:
            print(i, end=' ')


<mask token>

def Sieve_of_Eratosthenes(n):
    prime = [(True) for i in range(n + 1)]
    p = 2
    while p <= n:
        if prime[p] == True:
            for i in range(p * 2, n + 1, p):
                prime[i] = False
        p += 1
    prime[0] = False
    prime[1] = False
    for i in range(n + 1):
        if prime[i]:
            print(i, end=' ')


<mask token>
Sieve_of_Eratosthenes(a)

def Sieve_of_Eratosthenes(n):
    prime = [(True) for i in range(n + 1)]
    p = 2
    while p <= n:
        if prime[p] == True:
            for i in range(p * 2, n + 1, p):
                prime[i] = False
        p += 1
    prime[0] = False
    prime[1] = False
    for i in range(n + 1):
        if prime[i]:
            print(i, end=' ')


a = int(input('Upto How Many Terms: '))
Sieve_of_Eratosthenes(a)

def Sieve_of_Eratosthenes(n):
    prime = [True for i in range(n+1)]
    p = 2
    while p <= n:
        if prime[p] == True:
            for i in range(p*2, n+1, p):
                prime[i] = False
        p += 1

    prime[0] = False
    prime[1] = False
    for i in range(n+1):
        if prime[i]:
            print(i, end=" ")


a = int(input("Upto How Many Terms: "))
Sieve_of_Eratosthenes(a)
