"""
User picks number n and program returns all prime number from 0 until n.
"""


def is_prime(num):
    for i in range(2, num):
        if (num % i) == 0:
            return False
    return True


number_picked = int(raw_input("Pick a number: "))

print 2

for i in range(3, number_picked, 2):
    if is_prime(i):
        print i,
03aec8b2fc831d515721d45ab35225a7da150ba2
"""
User picks number n and program returns all prime number from 0 until n.
"""


def is_prime(num):
    for i in range(2, num):
        if (num % i) == 0:
            return False
    return True


number_picked = int(raw_input("Pick a number: "))

print 2

for i in range(3, number_picked, 2):
    if is_prime(i):
        print i,