x=100000 import math L=math.floor(math.sqrt(x)) # 平方根を求める Primelist=[i for i in range(x+1)] Primelist[1]=0 # 1は素数でないので0にする. for i in Primelist: if i>L: break if i==0: continue for j in range(2*i,x+1,i): Primelist[j]=0 Primes=[Primelist[j] for j in range(x+1) if Primelist[j]!=0] PS=set(Primes) for a in range(2,100): for b in range(a+1,100): for c in range(b+1,100): for d in range(c+1,100): if a+b in PS and c+d in PS: if not (a+c) in PS and not (a+d) in PS and not (b+c) in PS and not (b+d) in PS: LIST=[a,b,c,d] #print(LIST) LIST=[2,3,6,7] N=int(input()) for a in range(100): for b in range(100): k=a*b rest=N-k if rest<0: break for c in range(100): for d in range(100): if rest==c*d and a+b+c+d<=250: ANS=[2]*a+[3]*b+[6]*c+[7]*d print(len(ANS)) print(*ANS) exit()