# S. Kondrashov
n = int(input())
if n<=1 and n>100:
    print("INPUT DATA ERROR")
i = 2
k = 2
res = []
while i*k <=n:
    while i*k <=n:
        #print(i*k)
        if res.count(i*k) == 0:
            res.append(i*k)
        k = k + 1
    i = i + 1
    k = i
res.sort()
#for j in res:
#   print(j)
print(res)
print(len(res))