x,y = map(int,input().split()) print(3) print(x,y,y) t = int(input()) if t!=x: print(1-x) else: print(x)