K=int(input()) if K==0: ANS=[1] print(len(ANS)) print(*ANS) exit() for i in range(2,10000000): x=i*(i-1)//2 if K%x==0: r=K//x for j in range(31): if r==(1<