#coding: utf-8 ##yuki_40 n=int(raw_input()) a=map(int,raw_input().split()) f0=a[0] #f(x)=b2*x**2+b1*x+b0 f1=0 f2=0 for i in xrange(n+1): f1+=a[i] for i in xrange(n+1): if i%2==0: f2+=a[i] else: f2-=a[i] b0=f0 b1=(f1-f2)/2 b2=(f1+f2)/2-f0 if b2!=0: print 2 elif b2==0 and b1!=0: print 1 else: print 0 if b2==0 and b1==0: b2='' b1='' elif b2!=0 and b1==0: b1=b1 elif b2==0: b2='' print b0,b1,b2