x,y=map(int,input().split()) print(3) print(x,y,y) k=int(input()) if k: print(y) else: print(y^1)