generate-composite-numbers
Source: hackerearth
Difficulty: EASY

In this problem you will be given a range 'n', and you are supposed to find all composite numbers within that range. Make your program efficient as time limit of the program is set to 1 second. Choose an efficient algorithm to find all the composite numbers within the range 0 to n.

Input

n - a single positive Integer.

Output

Space separated composite-numbers within the range of 0 and n.

Constrains

1 ≤ n ≤ 10000

SAMPLE INPUT
8

SAMPLE OUTPUT
4 6 8


'''
# Read input from stdin and provide input before running code

name = raw_input('What is your name?\n')
print 'Hi, %s.' % name
'''
#print 'Hello World!'
import math
def findprime(n):
	for i in range(2,int(math.sqrt(n)) + 1):
		if(n % i == 0):
			print(n, end=' ')
			break
n = int(input())
if(n == 1 or n==2 or n==3):
	print((0))
else:
	for i in range(4,n+1):
		findprime(i)


def sieveof(a, b):
	##a and b are the range between which the primes are to be found
	##a and b are inclusive
	s=[]
	for i in range(b+1):
		s.append(i)
	s[0]=2
	s[1]=2
	for i in range(2,1+int(b**0.5)):
		j=2
		while i*j<=b:
			s[i*j]=None
			j+=1
	for i in range(a, b+1):
		if s[i]==None:
			print(i, end=' ')
a=0
b=eval(input())
sieveof(a, b)


n=int(input())
prime = [True]*(n+1)

def mark(prime,k,n):
	step=2*k
	while step<=n:
		prime[step]=False
		step+=k

for i in range(2,n+1):
	if(prime[i]==True):
		mark(prime,i,n)

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


'''
# Read input from stdin and provide input before running code

name = raw_input('What is your name?\n')
print 'Hi, %s.' % name
'''
import math
def is_prime(n):
	if n==2:
		return True
	if n%2==0 or n<=1:
		return False
	sqr=int(math.sqrt(n))+1
	for d in range(3,sqr,2):
		if n%d==0:
			return False
	return True
x=eval(input())
m=[]
for i in range(2,x+1):
	if is_prime(i)==False:
		m.append(i)
print(' '.join(str(x) for x in m))