N,d=int(input()),0 for i in range(N-100,N+101): for j in range(2,i):d=(d,i)[i%j==0] print(d)