X, Y = map(int, input().split()) if X == Y: print(4) print(*[X, X, Y, Y]) else: print(6) print(*[X, Y, X, Y, X, Y]) t = int(input()) print(t)