import sys input=lambda: sys.stdin.readline().rstrip() n=int(input()) import collections pf=collections.defaultdict(int) for i in range(2,int(n**0.5)+1): while n%i==0: pf[i]=pf.get(i,0)+1 n//=i if n>1: pf[n]=1 if len(pf.keys())==1: ans1=2 ans2=pf[2] else: m=1 ct2=pf[2] for p in pf.keys(): if p!=2: m*=p**pf[p] for i in range(ct2+2): if int(m**0.5)*(int(m**0.5)+1)==m: ans1=int(m**0.5)+1 ans2=ct2-i+1 break else: m*=2 if n==0: print(1) print(1) else: Ans=[1]*ans1+[0]*ans2 print(len(Ans)) print(*Ans)