K=int(input()) prime=[True for _ in range(1000001)] prime[0]=False prime[1]=False ansp=[] for i in range(2,999999): if prime[i]: cnt=2 while i*cnt<1000001: prime[i*cnt]=False cnt+=1 if i<999999 and prime[i+2]: ansp.append(i) if len(ansp)>250: break ans2=0 ansprime=0 for i in range(1,250): for j in range(1,250): if i*j==K and i+j<=250: ans2=i ansprime=j ans=[2]*ans2+ansp[:ansprime] if K==0: print(1) print(2) else: print(len(ans)) print(*ans)