D = input() a = map(int, raw_input().split()) def f(x): ret = 0 for i in xrange(D + 1): ret += a[i] * x ** i return ret x = (f(1) + f(-1) - 2 * f(0)) / 2 y = (f(1) - f(-1)) / 2 z = f(0) if x != 0: print 2 print z, y, x elif y != 0: print 1 print z, y else: print 0 print z