human
Can you provide a Python program to print all integers that you can write on a card so that the described condition fulfilled given the following:
Everybody knows what an arithmetic progression is. Let us remind you just in case that an arithmetic progression is such sequence of numbers a1, a2, ..., an of length n, that the following condition fulfills: 

a2 - a1 = a3 - a2 = a4 - a3 = ... = ai + 1 - ai = ... = an - an - 1.

For example, sequences [1, 5], [10], [5, 4, 3] are arithmetic progressions and sequences [1, 3, 2], [1, 2, 4] are not.

Alexander has n cards containing integers. Arthur wants to give Alexander exactly one more card with a number so that he could use the resulting n + 1 cards to make an arithmetic progression (Alexander has to use all of his cards).

Arthur has already bought a card but he hasn't written a number on it. Help him, print all integers that you can write on a card so that the described condition fulfilled.

Input

The first line contains integer n (1 ≤ n ≤ 105) — the number of cards. The next line contains the sequence of integers — the numbers on Alexander's cards. The numbers are positive integers, each of them doesn't exceed 108.

Output

If Arthur can write infinitely many distinct integers on the card, print on a single line -1.

Otherwise, print on the first line the number of integers that suit you. In the second line, print the numbers in the increasing order. Note that the numbers in the answer can exceed 108 or even be negative (see test samples).

Examples

Input

3
4 1 7

Output

2
-2 10

Input

1
10

Output

-1

Input

4
1 3 5 9

Output

1
7

Input

4
4 3 4 5

Output

0

Input

2
2 4

Output

3
0 3 6
assistant
#Here is Python program to print all integers that you can write on a card so that the described condition fulfilled.

#!/usr/bin/env python
import os
import sys
from io import BytesIO, IOBase

def readvars():
    k = map(int,input().split())
    return(k)

def readlist():
    li = list(map(int,input().split()))
    return(li)

def anslist(li):
    ans = " ".join([str(v) for v in li])
    return(ans)

def main():

	t = 1
#	t = int(input())

	for xx in range(t):
		n = int(input())
		a = readlist()

		a.sort()
		if n == 1:
			print(-1)
			continue

		if n == 2:
			dd = a[1]-a[0]
			if dd%2 == 0:
				if dd == 0:
					print(1)
					print(a[0])
					continue
				dd//=2
				print(3)
				print("{} {} {}".format(a[0]-2*dd,a[0]+dd,a[1]+2*dd))
			else:
				print(2)
				print("{} {}".format(a[0]-dd,a[1]+dd))
			continue
		if n >= 3:
			dif = [(a[i+1] - a[i]) for i in range(n-1)]
			freq = {}
			for i in dif:
				if i in freq:
					freq[i] += 1
				else:
					freq[i] = 1
			maxr = 0
			ct = 0
			for key in freq:
				maxr = max(freq[key],maxr)
				ct += 1
			if ct >= 3:
				print(0)
			if ct == 1:
				if dif[0] == 0:
					print(1)
					print(a[0])
					continue
				print(2)
				print("{} {}".format(a[0]-dif[0],a[n-1]+dif[0]))
			if ct == 2:
				din = []
				for k in freq:
					din.append(k)
				if min(din)*2 == max(din) and freq[max(din)] == 1:
					print(1)
					print(a[dif.index(max(din))]+min(din))
				else:
					print(0)





# region fastio

BUFSIZE = 8192

class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b =...