Everybody knows what an arithmetic progression is. Let us remind you just in case that an arithmetic progression is such sequence of numbers a_1, a_2, ..., a_{n} of length n, that the following condition fulfills: a_2 - a_1 = a_3 - a_2 = a_4 - a_3 = ... = a_{i} + 1 - a_{i} = ... = a_{n} - a_{n} - 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 ≤ 10^5) — 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 10^8.


-----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 10^8 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

Difficulty: MEDIUM_HARD

Solutions:
n = int(input())
a = sorted(list(map(int, input().split())))
if n == 1:
	print(-1)
	exit()
if n == 2 and (a[1] - a[0]) % 2 == 0 and (a[0] != a[1]):
	print(3)
	print(2 * a[0] - a[1], (a[0] + a[1]) // 2, 2 * a[1] - a[0])
	exit()
m = [a[i] - a[i - 1] for i in range(1, n)]
if len(set(m)) == 1:
	if m[0] != 0:
		print(2)
		print(a[0] - m[0], a[-1] + m[0])
	else:
		print(1)
		print(a[0])
	exit()
m.sort()
if len(set(m)) > 2 or m[-1] != 2 * m[-2]:
	print(0)
	exit()
print(1)
for i in range(1, n):
	if a[i] - a[i - 1] != m[0]:
		print(a[i - 1] + m[0])


n = int(input())
a = list(map(int, input().strip().split()))
a.sort()
poss = True
diff = [None] * 2
places = [[] for x in range(2)]
for x in range(n - 1):
	curr = a[x + 1] - a[x]
	if diff[0] is None:
		diff[0] = curr
		places[0].append(x)
	elif curr != diff[0] and diff[1] is None:
		diff[1] = curr
		places[1].append(x)
	elif curr == diff[0]:
		places[0].append(x)
	elif curr == diff[1]:
		places[1].append(x)
	else:
		poss = False
		break
	if len(places[0]) > 1 and len(places[1]) > 1:
		poss = False
		break
if poss == True:
	if diff[1] is None:
		if len(places[0]) == 0:
			print(-1)
		elif len(places[0]) == 1:
			if diff[0] % 2 == 0 and diff[0] != 0:
				print(3)
				print(a[0] - diff[0], a[0] + diff[0] // 2, a[1] + diff[0])
			elif diff[0] == 0:
				print(1)
				print(a[0])
			else:
				print(2)
				print(a[0] - diff[0], a[1] + diff[0])
		elif diff[0] != 0:
			print(2)
			print(a[0] - diff[0], a[-1] + diff[0])
		else:
			print(1)
			print(a[0])
	elif len(places[0]) > 1:
		if diff[0] * 2 == diff[1]:
			print(1)
			print(a[places[1][0]] + diff[0])
		else:
			print(0)
	elif len(places[1]) > 1:
		if diff[1] * 2 == diff[0]:
			print(1)
			print(a[places[0][0]] + diff[1])
		else:
			print(0)
	elif diff[0] * 2 == diff[1]:
		print(1)
		print(a[places[1][0]] + diff[0])
	elif diff[1] * 2 == diff[0]:
		print(1)
		print(a[places[0][0]] + diff[1])
	else:
		print(0)
else:
	print(0)


import sys
import collections
from collections import Counter, deque
import itertools
import math
import timeit
import random

def sieve(n):
	if n < 2:
		return list()
	prime = [True for _ in range(n + 1)]
	p = 3
	while p * p <= n:
		if prime[p]:
			for i in range(p * 2, n + 1, p):
				prime[i] = False
		p += 2
	r = [2]
	for p in range(3, n + 1, 2):
		if prime[p]:
			r.append(p)
	return r

def divs(n, start=1):
	divisors = []
	for i in range(start, int(math.sqrt(n) + 1)):
		if n % i == 0:
			if n / i == i:
				divisors.append(i)
			else:
				divisors.extend([i, n // i])
	return divisors

def divn(n, primes):
	divs_number = 1
	for i in primes:
		if n == 1:
			return divs_number
		t = 1
		while n % i == 0:
			t += 1
			n //= i
		divs_number *= t

def flin(d, x, default=-1):
	left = right = -1
	for i in range(len(d)):
		if d[i] == x:
			if left == -1:
				left = i
			right = i
	if left == -1:
		return (default, default)
	else:
		return (left, right)

def ceil(n, k):
	return n // k + (n % k != 0)

def ii():
	return int(input())

def mi():
	return map(int, input().split())

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

def lcm(a, b):
	return abs(a * b) // math.gcd(a, b)

def prr(a, sep=' '):
	print(sep.join(map(str, a)))

def dd():
	return collections.defaultdict(int)

def ddl():
	return collections.defaultdict(list)
n = ii()
if n == 1:
	exit(print(-1))
d = sorted(li())
p = []
c = dd()
for i in range(n - 1):
	t = d[i + 1] - d[i]
	p.append(t)
	c[t] += 1
(t, r) = (min(c), max(c))
if len(c) == 1:
	res = [d[0] - t]
	if t != 0:
		res.append(d[-1] + t)
		if n == 2 and (not t % 2):
			res.append(d[0] + t // 2)
	res.sort()
	print(len(res))
	print(*res)
elif len(c) == 2 and c[r] == 1 and (r == 2 * t):
	print(1, d[p.index(r)] + t, sep='\n')
else:
	print(0)


def main(inp):
	n = int(input())
	arr = split_inp_int(inp)
	arr.sort()
	if n == 1:
		print(-1)
		return
	if n == 2:
		(a, b) = arr
		diff = b - a
		if diff == 0:
			print(1)
			print(a)
		elif diff % 2 == 0:
			print(3)
			print(a - diff, a + diff // 2, b + diff)
		else:
			print(2)
			print(a - diff, b + diff)
		return
	diffs = [arr[i] - arr[i - 1] for i in range(1, n)]
	if len(set(diffs)) > 2:
		print(0)
		return
	if len(set(diffs)) == 1:
		diff = arr[1] - arr[0]
		if diff == 0:
			print(1)
			print(arr[0])
		else:
			print(2)
			print(arr[0] - diff, arr[-1] + diff)
		return
	diffs_counter = [(k, v) for (k, v) in Counter(diffs).items()]
	diffs_counter.sort()
	if diffs_counter[1][1] != 1:
		print(0)
		return
	common_diff = diffs_counter[0][0]
	other_diff = diffs_counter[1][0]
	if other_diff != common_diff * 2:
		print(0)
		return
	print(1)
	print(arr[0] + common_diff * diffs.index(other_diff) + common_diff)

def split_inp_int(inp):
	return list(map(int, inp().split()))

def use_fast_io():
	import sys

	class InputStorage:

		def __init__(self, lines):
			lines.reverse()
			self.lines = lines

		def input_func(self):
			if self.lines:
				return self.lines.pop()
			else:
				return ''
	return input
	input_storage_obj = InputStorage(sys.stdin.readlines())
	return input_storage_obj
from collections import Counter, defaultdict
from functools import reduce
import operator
import math

def product(arr_):
	return reduce(operator.mul, arr_, 1)
main(use_fast_io())


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
	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)
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 = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


n = int(input())

def main():
	lst = sorted(list(map(int, input().split(' '))))
	dct = set()
	for i in range(len(lst) - 1):
		dct.add(lst[i + 1] - lst[i])
	if len(dct) > 2:
		print(0)
	elif len(dct) == 2 and 0 in dct:
		print(0)
	elif len(dct) == 2:
		if 2 * min(dct) == max(dct):
			cnt = 0
			for i in range(len(lst) - 1):
				if lst[i + 1] - lst[i] == max(dct):
					ans = (lst[i] + lst[i + 1]) // 2
					cnt += 1
					if cnt >= 2:
						print(0)
						return
			print(1)
			print(ans)
		else:
			print(0)
	elif len(lst) == 1:
		print(-1)
	elif len(dct) == 1 and len(lst) > 2:
		if list(dct)[0] == 0:
			print(1)
			print(lst[0])
		else:
			print(2)
			print(lst[0] - lst[1] + lst[0], end=' ')
			print(lst[-1] + lst[1] - lst[0])
	elif len(dct) == 1 and len(lst) == 2:
		if list(dct)[0] == 0:
			print(1)
			print(lst[0])
		else:
			ans = []
			ans.append(lst[0] - lst[1] + lst[0])
			ans.append(lst[-1] + lst[1] - lst[0])
			t = 1.0 * (lst[0] + lst[1]) / 2
			if t % 1 == 0:
				print(3)
				ans.append(int(t))
			else:
				print(2)
			print(' '.join(map(str, sorted(ans))))
main()


n = int(input())
li = list(map(int, input().split()))
if n == 1:
	print(-1)
elif n == 2:
	li.sort()
	d = li[1] - li[0]
	if d == 0:
		print(1)
		print(li[0])
	elif d % 2 == 0:
		print(3)
		print(li[0] - d, li[0] + d // 2, li[1] + d)
	else:
		print(2)
		print(li[0] - d, li[1] + d)
else:
	flag = 0
	li.sort()
	d = li[1] - li[0]
	for i in range(2, n):
		if li[i] - li[i - 1] < d:
			d = li[i] - li[i - 1]
	for i in range(1, n):
		if li[i] - li[i - 1] != d:
			if li[i] - li[i - 1] == 2 * d:
				flag += 1
				ind = i
			else:
				flag = -1
				break
	if d == 0 and flag == 0:
		print(1)
		print(li[0])
	elif flag == -1 or flag > 1:
		print(0)
	elif flag == 1:
		print(1)
		print(li[ind] - d)
	else:
		print(2)
		print(li[0] - d, li[-1] + d)


n = int(input())
if n == 1:
	print(-1)
	quit()
l = list(map(int, input().split()))
l.sort()
if n == 2:
	d = l[1] - l[0]
	if d == 0:
		print(1)
		print(l[0])
		quit()
	if d % 2 == 0:
		print(3)
		print(l[0] - d, l[0] + d // 2, l[1] + d)
	else:
		print(2)
		print(l[0] - d, l[1] + d)
else:
	des = []
	for i in range(1, n):
		des.append(l[i] - l[i - 1])
	des.sort()
	d = des[0]
	flag = True
	ans = 0
	for i in des:
		if i != d:
			if i == 2 * d and flag:
				flag = False
				ans = i
			else:
				print(0)
				quit()
	if flag:
		if d == 0:
			print(1)
			print(l[0])
		else:
			print(2)
			print(l[0] - d, l[-1] + d)
	else:
		print(1)
		for i in range(1, n):
			if l[i] - l[i - 1] == ans:
				print(l[i] - ans // 2)


def func(n, l1):
	if n == 1:
		print(-1)
		return 0
	s = set(l1)
	if len(s) == 1:
		print(1)
		print(l1[0])
		return 0
	l1.sort()
	diff = min(l1[-1] - l1[-2], l1[1] - l1[0])
	l = []
	if n == 2:
		if diff == 0:
			print(1)
			print(l1[0])
			return 0
		l.append(l1[0] - diff)
		if diff & 1 == 0:
			l.append(l1[0] + diff // 2)
		l.append(l1[1] + diff)
		print(len(l))
		print(*l)
		return 0
	for i in range(1, n):
		d = l1[i] - l1[i - 1]
		if d < diff:
			print(0)
			return 0
		elif d == diff:
			continue
		else:
			if d == 2 * diff:
				l.append(l1[i] - diff)
			else:
				print(0)
				return 0
			if len(l) > 1:
				print(0)
				return 0
	if len(l) == 1:
		print(1)
		print(l[0])
		return 0
	print(2)
	print(l1[0] - diff, l1[-1] + diff)
n = int(input())
l1 = list(map(int, input().split()))
func(n, l1)


import sys
input = sys.stdin.readline
for _ in range(1):
	n = int(input())
	arr = [int(x) for x in input().split()]
	arr.sort()
	if n == 1:
		print(-1)
	elif n == 2:
		if arr[1] - arr[0] == 0:
			print(1)
			print(arr[0])
		elif (arr[1] - arr[0]) % 2:
			print(2)
			print(arr[0] - (arr[1] - arr[0]), arr[-1] + arr[1] - arr[0])
		else:
			print(3)
			print(arr[0] - (arr[1] - arr[0]), (arr[0] + arr[1]) // 2, arr[-1] + arr[1] - arr[0])
	else:
		arr.sort()
		if arr[0] == arr[-1]:
			print(1)
			print(arr[0])
			exit(0)
		diff = arr[1] - arr[0]
		i = 1
		while i < n:
			if arr[i] - arr[i - 1] == diff:
				i += 1
			else:
				break
		if i == n:
			print(2)
			print(arr[0] - diff, arr[-1] + diff)
			exit(0)
		c = 0
		f = True
		temp = []
		diff = (arr[-1] - arr[0]) // n
		for i in range(1, n):
			if arr[i] - arr[i - 1] != diff and arr[i] - arr[i - 1] != 2 * diff:
				f = False
			if arr[i] - arr[i - 1] == 2 * diff:
				c += 1
				temp.append(arr[i])
		if c == 1 and f == True:
			print(1)
			print(temp[0] - diff)
		else:
			print(0)


n = int(input())
a = sorted(list(map(int, input().split())))
how = sum([1 for i in range(n) if a[0] == a[i]])
if n >= 2:
	d = min([a[i] - a[i - 1] for i in range(1, len(a))])
else:
	d = 0
is_ok = True
for i in range(1, len(a)):
	if a[i] - a[i - 1] != d:
		is_ok = False
if n == 1:
	print(-1)
	exit(0)
elif how == n:
	print(1)
	print(a[0])
elif is_ok:
	L = []
	if n == 2:
		if (a[0] + a[1]) % 2 == 0:
			L.append((a[0] + a[1]) // 2)
	L.append(min(a) - d)
	L.append(max(a) + d)
	L = sorted(L)
	print(len(L))
	if len(L) > 0:
		for i in L:
			print(i, end=' ')
		print()
else:
	L = []
	if n == 2:
		if (a[0] + a[1]) % 2 == 0:
			L.append((a[0] + a[1]) // 2)
	for i in range(1, n):
		if 2 * d == a[i] - a[i - 1] and d != 0:
			L.append(a[i - 1] + d)
	if len(L) <= 1:
		valid = True
		for i in L:
			a.append(i)
		a = sorted(a)
		tmp = a[1] - a[0]
		for i in range(1, len(a)):
			if a[i] - a[i - 1] != tmp:
				valid = False
				break
		if valid == False:
			print(0)
			exit(0)
		print(len(L))
		for i in L:
			print(i, end=' ')
		print()
	else:
		print(0)


n = int(input())
a = list(map(int, input().split()))
a.sort()
if n == 1:
	print(-1)
elif n == 2:
	if (a[1] - a[0]) % 2 == 1 or a[1] == a[0]:
		df = a[1] - a[0]
		if df == 0:
			print(1)
			print(a[0])
		else:
			print(2)
			print(a[0] - df, a[1] + df)
	else:
		print(3)
		df = a[1] - a[0]
		print(a[0] - df, (a[0] + a[1]) // 2, a[1] + df)
else:
	d = {}
	for i in range(1, n):
		try:
			k = d[a[i] - a[i - 1]]
			d[a[i] - a[i - 1]] += 1
		except:
			d[a[i] - a[i - 1]] = 1
	k = min(d.keys())
	c = 0
	b = -1
	for i in d.keys():
		if i != k:
			c += d[i]
			b = i
	if c > 1:
		print(0)
	elif c == 1 and k == 0:
		print(0)
	elif c == 0 and k == 0:
		print(1)
		print(a[0])
	elif c == 0:
		print(2)
		k1 = min(a[0], a[len(a) - 1])
		k2 = max(a[0], a[len(a) - 1])
		print(k1 - k, k2 + k)
	elif b % 2 == 1 or b // 2 != k:
		print(0)
	else:
		u = -1
		for i in range(1, n):
			if a[i] - a[i - 1] == b:
				u = a[i - 1]
				break
		print(1)
		print(u + k)


n = int(input())
p = input().rstrip().split(' ')
p.sort(key=int)
if len(p) == 1:
	print(-1)
elif len(set(p)) == 1:
	print(1)
	print(p[0])
elif len(p) == 2:
	if int(p[0]) + 2 == int(p[1]):
		print(3)
		print(int(p[0]) - 2, int(p[0]) + 1, int(p[len(p) - 1]) + 2)
	elif (int(p[0]) + int(p[1])) % 2 == 0:
		print(3)
		print(int(p[0]) - (int(p[1]) - int(p[0])), (int(p[0]) + int(p[1])) // 2, int(p[len(p) - 1]) + (int(p[1]) - int(p[0])))
	else:
		print(2)
		print(int(p[0]) - (int(p[1]) - int(p[0])), int(p[len(p) - 1]) + (int(p[1]) - int(p[0])))
else:
	l = []
	for i in range(0, len(p) - 1):
		l.append(int(p[i + 1]) - int(p[i]))
	if len(list(set(l))) == 1:
		print(2)
		print(int(p[0]) - l[0], int(p[len(p) - 1]) + l[0])
	elif len(list(set(l))) == 2 and 0 not in l:
		x = list(set(l))
		if l.count(x[0]) == 1 or l.count(x[1]) == 1:
			maxf = -999999999
			for i in range(0, len(x)):
				if l.count(x[i]) > maxf:
					maxf = x[i]
			if x[0] != maxf:
				C = l.index(x[0])
				w = []
				p.insert(C + 1, int(p[C]) + maxf)
				for j in range(0, len(p) - 1):
					w.append(int(p[j + 1]) - int(p[j]))
				if len(list(set(w))) == 1:
					print(1)
					print(int(p[C]) + maxf)
				else:
					print(0)
			elif x[1] != maxf:
				C = l.index(x[1])
				w = []
				p.insert(C + 1, int(p[C]) + maxf)
				for j in range(0, len(p) - 1):
					w.append(int(p[j + 1]) - int(p[j]))
				if len(list(set(w))) == 1:
					print(1)
					print(int(p[C]) + maxf)
				else:
					print(0)
		else:
			print(0)
	else:
		print(0)


from sys import stdin, stdout
from collections import Counter
nmbr = lambda : int(stdin.readline())
lst = lambda : list(map(int, input().split()))
for _ in range(1):
	n = nmbr()
	f = 1
	a = sorted(lst())
	if n == 1:
		print(-1)
		continue
	if a[0] == a[-1]:
		print(1)
		print(a[0])
		continue
	if n == 2:
		if a[0] + a[1] & 1 == 0:
			b = (a[0] + a[1]) // 2
			d = a[1] - a[0]
			print(3)
			print(a[0] - d, b, a[1] + d)
		else:
			d = a[1] - a[0]
			print(2)
			print(a[0] - d, a[1] + d)
		continue
	dd = Counter(a)
	d1 = a[1] - a[0]
	d2 = a[-1] - a[-2]
	d = min(d1, d2)
	if d == 0:
		print(0)
		continue
	nn = (a[-1] - a[0]) // d + 1
	sm = nn * (2 * a[0] + (nn - 1) * d) // 2
	ss = sum(a)
	if sm == ss:
		print(2)
		print(a[0] - d, a[-1] + d)
	else:
		diff = sm - ss
		a += [diff]
		a.sort()
		f = 1
		x = a[0]
		for v in a:
			if v != x:
				f = 0
				break
			x += d
		if f:
			print(1)
			print(diff)
		else:
			print(0)


import sys
n = int(input())
a = sorted(list(map(int, input().split())))
if n == 1:
	print(-1)
else:
	d = a[1] - a[0]
	x = 0
	v = 0
	t = -1
	v1 = 0
	t1 = -1
	for i in range(1, n):
		if a[i] - a[i - 1] == d:
			x += 1
		elif a[i] - a[i - 1] == 2 * d:
			v += 1
			t = i - 1
		elif 2 * (a[i] - a[i - 1]) == d:
			v1 += 1
			t1 = i - 1
		else:
			print(0)
			return
		if v >= 2:
			print(0)
			return
	if v == 1:
		print(1)
		print(a[t] + d)
		return
	if v1 > 0 and v1 + 1 < n - 1:
		print(0)
		return
	if v1 > 0 and v1 + 1 == n - 1:
		print(1)
		print(a[0] + d // 2)
		return
	if d == 0:
		print(1)
		print(a[0])
		return
	ans = [a[0] - d]
	if n == 2:
		if d % 2 == 0:
			ans.append(a[0] + d // 2)
	ans.append(a[n - 1] + d)
	print(len(ans))
	for i in ans:
		print(i, end=' ')


def all_same(a):
	return all([x == a[0] for x in a])
N = int(input())
array = sorted([int(x) for x in input().split()])
tobeprinted = []
setarray = set(array)
if N == 1:
	print(-1)
	exit()
elif all_same(array):
	print(1)
	print(array[0])
	exit()
elif N == 2:
	difference = array[1] - array[0]
	tobeprinted.append(array[1] + difference)
	tobeprinted.append(array[0] - difference)
	if (array[1] + array[0]) % 2 == 0:
		tobeprinted.append((array[1] + array[0]) // 2)
	print(len(tobeprinted))
	print(*sorted(tobeprinted))
	exit()
else:
	commondifference = []
	for i in range(1, N):
		commondifference.append(array[i] - array[i - 1])
	if all_same(commondifference):
		print(2)
		print(array[0] - commondifference[0], array[-1] + commondifference[0])
		exit()
	unique = {}
	for i in commondifference:
		if i in unique:
			unique[i] += 1
		else:
			unique[i] = 1
	commondifference = sorted(commondifference)
	if len(unique) == 2 and (unique[commondifference[0]] == 1 or unique[commondifference[-1]] == 1):
		dummy = []
		if commondifference[0] == 0 or commondifference[-1] == 0:
			print(0)
			exit()
		elif unique[commondifference[0]] > unique[commondifference[1]]:
			realcommondifference = commondifference[0]
		elif unique[commondifference[0]] < unique[commondifference[1]]:
			realcommondifference = commondifference[1]
		else:
			realcommondifference = min(commondifference[0], commondifference[1])
		setdummy = set()
		for i in range(N + 1):
			setdummy.add(array[0] + i * realcommondifference)
			if array[0] + i * realcommondifference not in setarray:
				dummy.append(array[0] + i * realcommondifference)
		for i in array:
			if i not in setdummy:
				print(0)
				exit()
		if len(dummy) == 1:
			print(1)
			print(dummy[0])
			exit()
		else:
			print(0)
			exit()
	else:
		print(0)


__author__ = 'asmn'
n = int(input())
a = sorted(map(int, input().split()))

def checked(a, d):
	for i in range(1, len(a)):
		if a[i] - a[i - 1] != d:
			return False
	return True
td = None

def canfix(a):
	a = sorted((a[i] - a[i - 1] for i in range(1, len(a))))
	if a[-1] != a[0] * 2:
		return False
	elif sum(a) != a[0] * (len(a) + 1):
		return False
	else:
		global td
		td = a[0]
		return True

def fix(a, d):
	for i in range(1, len(a)):
		if a[i] - a[i - 1] != d:
			return a[i] - d
if n == 1:
	print(-1)
elif n == 2:
	if sum(a) % 2 == 0:
		if a[0] == a[1]:
			print(1)
			print(a[0])
		else:
			print(3)
			print(*(2 * a[0] - a[1], sum(a) // 2, 2 * a[1] - a[0]))
	else:
		print(2)
		print(*(2 * a[0] - a[1], 2 * a[1] - a[0]))
else:
	d = a[1] - a[0]
	if checked(a, d):
		if d == 0:
			print(1)
			print(a[0])
		else:
			print(2)
			print(a[0] - d, a[-1] + d)
	elif canfix(a):
		print(1)
		print(fix(a, td))
	else:
		print(0)


import time, math, bisect, sys
from sys import stdin, stdout
from collections import deque
from fractions import Fraction
from collections import Counter
from collections import OrderedDict
pi = 3.141592653589793

def II():
	return int(stdin.readline())

def IO():
	return stdin.readline()

def IP():
	return map(int, stdin.readline().split())

def L():
	return list(map(int, stdin.readline().split()))

def P(x):
	return stdout.write(str(x))

def PI(x, y):
	return stdout.write(str(x) + ' ' + str(y) + '\n')

def lcm(a, b):
	return a * b // gcd(a, b)

def gcd(a, b):
	if a == 0:
		return b
	elif b == 0:
		return a
	if a > b:
		return gcd(a % b, b)
	else:
		return gcd(a, b % a)

def sieve():
	li = [True] * 1000001
	(li[0], li[1]) = (False, False)
	for i in range(2, len(li), 1):
		if li[i] == True:
			for j in range(i * i, len(li), i):
				li[j] = False
	prime = []
	for i in range(1000001):
		if li[i] == True:
			prime.append(i)
	return prime

def setBit(n):
	count = 0
	while n != 0:
		n = n & n - 1
		count += 1
	return count

def readTree(v, e):
	adj = [set() for i in range(v + 1)]
	for i in range(e):
		(u1, u2, w) = IP()
		adj[u1].add((u2, w))
		adj[u2].add((u1, w))
	return adj

def dfshelper(adj, i, visited):
	nodes = 1
	visited[i] = True
	for ele in adj[i]:
		if visited[ele] == False:
			nd = dfshelper(adj, ele, visited)
			nodes += nd
	return nodes

def dfs(adj, v):
	visited = [False] * (v + 1)
	li = []
	for i in range(v):
		if visited[i] == False:
			nodes = dfshelper(adj, i, visited)
			li.append(nodes)
	return li
mx = 10 ** 9 + 7

def solve():
	n = II()
	li = L()
	li.sort()
	d = {}
	for i in range(n - 1):
		ele = li[i + 1] - li[i]
		d[ele] = d.get(ele, 0) + 1
	if len(d) > 2:
		print(0)
	elif len(d) == 0:
		print(-1)
	elif len(d) == 1:
		x = list(d.keys())[0]
		if x == 0:
			print(1)
			print(li[0])
		elif n == 2 and x % 2 == 0:
			print(3)
			print(li[0] - x, li[0] + x // 2, li[-1] + x)
		else:
			print(2)
			print(li[0] - x, li[-1] + x)
	else:
		(uni, com) = (-1, -1)
		for ele in d:
			if d[ele] == 1 and uni == -1:
				uni = ele
			else:
				com = ele
		if n == 3:
			(com, uni) = (min(uni, com), max(uni, com))
			if uni != 2 * com:
				print(0)
			else:
				print(1)
				for i in range(n - 1):
					if li[i + 1] - li[i] == uni:
						print(li[i] + com)
		elif uni < com or uni != 2 * com:
			print(0)
		else:
			print(1)
			for i in range(n - 1):
				if li[i + 1] - li[i] == uni:
					print(li[i] + com)
solve()


def main():
	n = int(input())
	l = sorted(map(int, input().split()))
	if n == 1:
		print(-1)
		return
	elif n == 2:
		(a, b) = l
		res = {a * 2 - b, b * 2 - a}
		if not a + b & 1:
			res.add((a + b) // 2)
	else:
		q = min(l[1] - l[0], l[-1] - l[-2])
		(a, res) = (l[0] - q, ())
		for b in l:
			if q != b - a:
				if res or q * 2 != b - a:
					res = ()
					break
				else:
					res = (b - q,)
			a = b
		else:
			if not res:
				res = {l[0] - q, b + q}
	print(len(res))
	if res:
		print(*sorted(res))
main()


n = int(input())
if n == 1:
	print(-1)
	exit(0)
b = [*map(int, input().split())]
a = sorted(b)
l = set()
if n == 2 and a[1] - a[0] != 0 and ((a[1] - a[0]) % 2 == 0):
	print(3)
	print(a[0] - (a[1] - a[0]), a[0] + (a[1] - a[0]) // 2, a[-1] + (a[1] - a[0]))
	exit(0)
elif n == 2 and (a[1] - a[0]) % 2 != 0:
	print(2)
	print(a[0] - (a[1] - a[0]), a[-1] + (a[1] - a[0]))
	exit(0)
d = min((a[i + 1] - a[i] for i in range(n - 1)))
c = 0
s = set()
for i in range(n - 1):
	if a[i + 1] - a[i] == d:
		continue
	elif a[i + 1] - a[i] == 2 * d:
		s.add(a[i] + d)
	else:
		print(0)
		exit(0)
if s:
	if len(s) > 1:
		print(0)
		exit(0)
	print(len(s))
	print(*s)
else:
	l = {a[0] - d, a[-1] + d}
	print(len(l))
	print(*sorted(l))


n = int(input())
arr = [int(x) for x in input().split()]
cd = {}
arr.sort()
for i in range(1, n):
	cdtemp = arr[i] - arr[i - 1]
	if cdtemp not in cd:
		cd[cdtemp] = 1
	else:
		cd[cdtemp] += 1
if len(cd) > 2:
	print(0)
elif len(cd) == 1:
	for (key, val) in cd.items():
		if key == 0:
			num = 1
			ans = [arr[0]]
		elif len(arr) == 2 and key % 2 == 0:
			num = 3
			ans = [arr[0] - key, arr[0] + key // 2, arr[1] + key]
		else:
			num = 2
			ans = [arr[0] - key, arr[-1] + key]
		print(num)
		print(*ans)
elif len(cd) == 2:
	com = []
	for (key, val) in cd.items():
		com.append(key)
	com.sort()
	if com[0] * 2 == com[1] and cd[com[1]] == 1:
		ans = []
		for i in range(1, n):
			if arr[i] - arr[i - 1] == com[1]:
				ans.append(arr[i - 1] + com[0])
				break
		print(1)
		print(*ans)
	else:
		print(0)
else:
	print(-1)


n = int(input())
arr = [int(x) for x in input().split()]
arr.sort()
if n == 1:
	print(-1)
elif n == 2:
	d = abs(arr[1] - arr[0])
	if d == 0:
		print(1)
		print(arr[0])
	elif d & 1:
		print(2)
		print(arr[0] - d, arr[1] + d)
	else:
		print(3)
		print(*sorted([arr[0] - d, arr[1] + d, int((arr[0] + arr[1]) / 2)]))
else:
	d1 = arr[1] - arr[0]
	d2 = arr[2] - arr[1]
	ans = []
	if d1 == d2:
		done = False
		fault = False
		cnt = 0
		for i in range(2, n):
			diff = arr[i] - arr[i - 1]
			if diff != d1:
				if d1 * 2 == diff:
					done = True
					ans.append((arr[i] + arr[i - 1]) // 2)
				else:
					fault = True
				cnt += 1
				if cnt > 1:
					break
		if done == False:
			ans.append(arr[0] - d1)
			ans.append(arr[-1] + d1)
		if fault or cnt > 1:
			ans = [-7649891]
	else:
		done = False
		fault = False
		cnt = 0
		for i in range(1, n):
			diff = arr[i] - arr[i - 1]
			if diff != d1:
				if d1 * 2 == diff:
					done = True
					ans.append((arr[i] + arr[i - 1]) // 2)
				else:
					ans = []
					fault = True
					break
				cnt += 1
				if cnt > 1:
					fault = False
					ans = [-7649891]
					break
		if fault:
			fault = False
			cnt = 0
			for i in range(1, n):
				diff = arr[i] - arr[i - 1]
				if diff != d2:
					if d2 * 2 == diff:
						done = True
						ans.append((arr[i] + arr[i - 1]) // 2)
					else:
						fault = True
					cnt += 1
					if cnt > 1:
						break
			if fault or cnt > 1:
				ans = [-7649891]
	if ans and ans[0] == -7649891:
		print(0)
	else:
		ans = list(set(ans))
		print(len(ans))
		ans.sort()
		print(*ans)


n = int(input())
a = sorted(map(int, input().split()))
if n == 1:
	print(-1)
else:
	if a[0] == a[-1]:
		p = [a[0]]
	else:
		p = []
		d = list(set((a[i + 1] - a[i] for i in range(n - 1))))
		if len(d) == 1:
			p = [a[0] - d[0], a[-1] + d[0]]
			if n == 2 and (a[1] - a[0]) % 2 == 0:
				p += [(a[1] + a[0]) // 2]
		elif len(d) == 2:
			if max(d) == 2 * min(d):
				for i in range(n - 1):
					if a[i + 1] - a[i] == max(d):
						if len(p) == 0:
							p = [(a[i + 1] + a[i]) // 2]
						else:
							p = []
							break
	print(len(p))
	print(' '.join(map(str, sorted(p))))


from collections import Counter
(n, a) = (int(input()), sorted(map(int, input().split())))
if n == 1:
	print(-1)
elif a[0] == a[-1]:
	print(1)
	print(a[0])
else:
	d = Counter((a[i + 1] - a[i] for i in range(n - 1)))
	if len(d) == 1:
		v = [2 * a[0] - a[1], 2 * a[-1] - a[-2]]
		if len(a) == 2 and sum(a) % 2 == 0:
			v.insert(1, (a[0] + a[1]) // 2)
		print(len(v))
		print(' '.join(map(str, v)))
	else:
		k = sorted(d.keys())
		if len(d) == 2 and d[k[1]] == 1 and (k[1] == 2 * k[0]):
			for i in range(n - 1):
				if a[i + 1] - a[i] == k[1]:
					print(1)
					print(a[i] + k[0])
		else:
			print(0)


import sys
n = int(input())
arr = list(map(int, input().split()))
if n == 1:
	print(-1)
	sys.exit()
arr.sort()
diff = []
req = []
flag2 = True
cnt = 0
for i in range(1, n):
	diff.append(arr[i] - arr[i - 1])
d = list(set(diff))
cnt = len(d)
if cnt > 2:
	print(0)
	sys.exit()
if cnt == 1:
	req.append(arr[0] - diff[0])
	req.append(arr[n - 1] + diff[0])
	if d[0] % 2 == 0 and n == 2:
		req.append(arr[0] + d[0] // 2)
if cnt == 2:
	d1 = d[0]
	d2 = d[1]
	d1c = diff.count(d1)
	d2c = diff.count(d2)
	if d1 == 2 * d2 and d1c == 1 and (d2c == n - 2):
		index = diff.index(d1)
		req.append(arr[index] + d2)
	if d2 == 2 * d1 and d2c == 1 and (d1c == n - 2):
		index = diff.index(d2)
		req.append(arr[index] + d1)
req = list(set(req))
print(len(req))
req.sort()
if len(req) > 0:
	print(*req)


n = int(input())
array = sorted(list(map(int, input().split())))

def all_same(items):
	return all((x == items[0] for x in items))
if n == 1:
	print(-1)
elif n == 2:
	t = max(array) - min(array)
	if t == 0:
		print(1)
		print(array[0])
	elif t % 2 == 0:
		print(3)
		print(min(array) - t, int(min(array) + t / 2), max(array) + t)
	else:
		print(2)
		print(min(array) - t, max(array) + t)
else:
	diff = [array[i + 1] - array[i] for i in range(n - 1)]
	if all_same(diff):
		t = array[1] - array[0]
		if t == 0:
			print(1)
			print(array[0])
		else:
			print(2)
			print(min(array) - t, max(array) + t)
	elif max(diff) == 2 * min(diff) and diff.count(max(diff)) == 1:
		print(1)
		print(array[diff.index(max(diff))] + min(diff))
	else:
		print(0)


import sys
(mod, MOD) = (1000000007, 998244353)

def get_array():
	return list(map(int, sys.stdin.readline().strip().split()))

def get_ints():
	return map(int, sys.stdin.readline().strip().split())

def input():
	return sys.stdin.readline().strip()

def check_sequence(D):
	mydict = dict()
	for i in D:
		mydict[i] = mydict.get(i, 0) + 1
	maxi = max(D)
	mini = min(D)
	if mydict[maxi] != 1 or maxi != 2 * mini:
		return True
	return False
n = int(input())
Arr = get_array()
Arr.sort()
if n == 1:
	print(-1)
	exit()
if n == 2:
	if Arr[1] - Arr[0] == 0:
		print(1)
		print(Arr[0])
	elif Arr[1] - Arr[0] & 1:
		print(2)
		print(Arr[0] - (Arr[1] - Arr[0]), Arr[1] + (Arr[1] - Arr[0]))
	else:
		print(3)
		print(Arr[0] - (Arr[1] - Arr[0]), Arr[0] + (Arr[1] - Arr[0]) // 2, Arr[1] + (Arr[1] - Arr[0]))
	exit()
D = []
for i in range(1, n):
	D.append(Arr[i] - Arr[i - 1])
if len(set(D)) == 1:
	if D[0] == 0:
		print(1)
		print(Arr[0])
	else:
		print(2)
		print(Arr[0] - (Arr[1] - Arr[0]), Arr[-1] + (Arr[1] - Arr[0]))
	exit()
if len(set(D)) >= 3 or check_sequence(D):
	print(0)
	exit()
d = Arr[1] - Arr[0]
ans = Arr[0] + (Arr[1] - Arr[0]) // 2
for i in range(1, n):
	if Arr[i] - Arr[i - 1] > d:
		ans = Arr[i - 1] + (Arr[i] - Arr[i - 1]) // 2
print(1)
print(ans)


n = int(input())
a = list(map(int, input().split()))
a.sort()
(diff, s, i, val) = (set(), set(), 0, 0)
while i < n - 1:
	diff.add(a[i + 1] - a[i])
	i += 1
diff = list(diff)
diff.sort()
if n == 1:
	print(-1)
elif n == 2:
	s.add(a[0] - diff[0])
	s.add(a[1] + diff[0])
	if diff[0] % 2 == 0:
		s.add(a[0] + diff[0] // 2)
	print(len(s))
	s = list(s)
	s.sort()
	for ele in s:
		print(ele, end=' ')
else:
	if len(diff) == 1:
		s.add(a[0] - diff[0])
		s.add(a[n - 1] + diff[0])
	elif len(diff) == 2:
		if diff[0] == diff[1] / 2:
			i = 0
			while i < n - 1:
				if a[i + 1] - a[i] == diff[1]:
					s.add(a[i] + diff[0])
					val += 1
				i += 1
	if val > 1:
		print(0)
	else:
		print(len(s))
		s = list(s)
		s.sort()
		for ele in s:
			print(ele, end=' ')


n = int(input())
a = input().split()
for i in range(n):
	a[i] = int(a[i])
a.sort()
if n == 1:
	print(-1)
elif n == 2:
	if a[0] == a[1]:
		print(1)
		print(a[0])
	elif (a[1] - a[0]) % 2 == 0:
		print(3)
		print(a[0] - (a[1] - a[0]), (a[0] + a[1]) // 2, a[1] + (a[1] - a[0]))
	else:
		print(2)
		print(a[0] - (a[1] - a[0]), a[1] + (a[1] - a[0]))
else:
	dic = {}
	for i in range(1, n):
		if a[i] - a[i - 1] in dic.keys():
			dic[a[i] - a[i - 1]] += 1
		else:
			dic[a[i] - a[i - 1]] = 1
	if len(dic.keys()) == 1:
		if a[0] == a[n - 1]:
			print(1)
			print(a[0])
		else:
			print(2)
			print(a[0] - (a[1] - a[0]), a[n - 1] + (a[1] - a[0]))
	elif len(dic.keys()) == 2:
		ls = [i for i in dic.keys()]
		ls.sort()
		if dic[ls[1]] == 1 and ls[1] % 2 == 0 and (ls[0] == ls[1] // 2):
			print(1)
			for i in range(1, n):
				if a[i] - a[i - 1] == ls[1]:
					print(a[i - 1] + ls[0])
					break
		else:
			print(0)
	else:
		print(0)


from collections import defaultdict
n = int(input())
sequence = [int(x) for x in input().split()]
sequence = sorted(sequence)
diff = defaultdict(int)
for i in range(0, len(sequence) - 1):
	difference = sequence[i + 1] - sequence[i]
	diff[difference] += 1
all_diffs = list(diff.keys())
ans = list()
if len(sequence) == 1:
	print(-1)
	exit()
elif len(all_diffs) == 1:
	ans.append(sequence[0] - all_diffs[0])
	ans.append(sequence[-1] + all_diffs[0])
	if len(sequence) == 2:
		if all_diffs[0] % 2 == 0:
			ans.append(sequence[0] + all_diffs[0] / 2)
elif len(all_diffs) == 2:
	all_diffs = sorted(all_diffs, key=lambda x: (diff[x], -x))
	if diff[all_diffs[0]] > 1:
		print(0)
		exit()
	elif all_diffs[0] == 2 * all_diffs[1]:
		val = 0
		for i in range(len(sequence) - 1):
			if sequence[i + 1] - sequence[i] == all_diffs[0]:
				val = sequence[i]
		ans.append(val + all_diffs[1])
	else:
		print(0)
		exit()
else:
	print(0)
	exit()
ans = set(ans)
print(len(ans))
ans = sorted(ans)
for i in ans:
	print(int(i), end=' ')


from sys import stdin

def solve(tc):
	n = int(stdin.readline().strip())
	seq = sorted(list(map(int, stdin.readline().split())))
	ans = []
	if n == 1:
		print(-1)
		return
	if n == 2:
		diff = seq[1] - seq[0]
		if diff == 0:
			print(1)
			print(seq[0])
			return
		ans.append(seq[0] - diff)
		if diff % 2 == 0:
			ans.append(seq[0] + diff // 2)
		ans.append(seq[1] + diff)
		print(len(ans))
		print(' '.join(map(lambda x: str(x), ans)))
		return
	mindiff = int(1e+18)
	for i in range(1, n):
		mindiff = min(mindiff, seq[i] - seq[i - 1])
	for i in range(1, n):
		diff = seq[i] - seq[i - 1]
		if diff > mindiff:
			if diff != mindiff * 2:
				print(0)
				return
			if len(ans) > 0:
				print(0)
				return
			ans.append(seq[i - 1] + mindiff)
	if len(ans) == 0:
		if mindiff == 0:
			print(1)
			print(seq[0])
			return
		ans.append(seq[0] - mindiff)
		ans.append(seq[-1] + mindiff)
	print(len(ans))
	print(' '.join(map(lambda x: str(x), ans)))
tcs = 1
for tc in range(tcs):
	solve(tc)


import os
import sys
from math import *
from collections import *
from bisect import *
from io import BytesIO, IOBase

def vsInput():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
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 = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
ALPHA = 'abcdefghijklmnopqrstuvwxyz/'
M = 1000000007
EPS = 1e-06

def Ceil(a, b):
	return a // b + int(a % b > 0)

def value():
	return tuple(map(int, input().split()))

def array():
	return [int(i) for i in input().split()]

def Int():
	return int(input())

def Str():
	return input()

def arrayS():
	return [i for i in input().split()]
n = int(input())
a = list(map(int, input().split(' ')))
a.sort()
if n == 1:
	print(-1)
elif len(set(a)) == 1:
	print(1)
	print(a[0])
else:
	dic = defaultdict(lambda : 0)
	for x in range(1, n):
		dic[a[x] - a[x - 1]] += 1
	if len(dic) == 1:
		if n == 2 and (a[1] - a[0]) % 2 == 0:
			print(3)
			print(a[0] - (a[1] - a[0]), a[0] + (a[1] - a[0]) // 2, a[n - 1] + a[n - 1] - a[n - 2])
		else:
			print(2)
			print(a[0] - (a[1] - a[0]), a[n - 1] + a[n - 1] - a[n - 2])
	elif len(dic) >= 3:
		print(0)
	elif 1 not in dic.values():
		print(0)
	else:
		avals = list(dic.keys())
		avals.sort()
		if avals[1] // 2 == avals[0] and avals[1] % 2 == 0 and (dic[avals[1]] == 1):
			for x in range(1, n):
				if a[x] - a[x - 1] == avals[1]:
					print(1)
					print(a[x] - avals[1] // 2)
		else:
			print(0)


from __future__ import division, print_function
import math
import os
import sys
from fractions import *
from sys import *
from io import BytesIO, IOBase
from itertools import *
from collections import *
M = 10 ** 9 + 7
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip
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 = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def inp():
	return sys.stdin.readline().rstrip('\r\n')

def out(var):
	sys.stdout.write(str(var))

def lis():
	return list(map(int, inp().split()))

def stringlis():
	return list(map(str, inp().split()))

def sep():
	return map(int, inp().split())

def strsep():
	return map(str, inp().split())

def fsep():
	return map(float, inp().split())

def inpu():
	return int(inp())

def regularbracket(t):
	p = 0
	for i in t:
		if i == '(':
			p += 1
		else:
			p -= 1
		if p < 0:
			return False
	else:
		if p > 0:
			return False
		else:
			return True

def binarySearchCount(arr, n, key):
	left = 0
	right = n - 1
	count = 0
	while left <= right:
		mid = int((right + left) / 2)
		if arr[mid] <= key:
			count = mid + 1
			left = mid + 1
		else:
			right = mid - 1
	return count

def reverse1(string):
	pp = ''
	for i in string[::-1]:
		pp += i
	if pp == string:
		return True
	return False

def reverse2(list1):
	l = []
	for i in list1[::-1]:
		l.append(i)
	if l == list1:
		return True
	return False

def mex(list1):
	p = max(list1) + 1
	for i in range(len(list1)):
		if list1[i] != i:
			p = i
			break
	return p

def sumofdigits(n):
	n = str(n)
	s1 = 0
	for i in n:
		s1 += int(i)
	return s1

def perfect_square(n):
	s = math.sqrt(n)
	if s == int(s):
		return True
	return False

def roman_number(x):
	if x > 15999:
		return
	value = [5000, 4000, 1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1]
	symbol = ['F', 'MF', 'M', 'CM', 'D', 'CD', 'C', 'XC', 'L', 'XL', 'X', 'IX', 'V', 'IV', 'I']
	roman = ''
	i = 0
	while x > 0:
		div = x // value[i]
		x = x % value[i]
		while div:
			roman += symbol[i]
			div -= 1
		i += 1
	return roman

def soretd(s):
	for i in range(1, len(s)):
		if s[i - 1] > s[i]:
			return False
	return True

def countRhombi(h, w):
	ct = 0
	for i in range(2, h + 1, 2):
		for j in range(2, w + 1, 2):
			ct += (h - i + 1) * (w - j + 1)
	return ct

def countrhombi2(h, w):
	return h * h // 4 * (w * w // 4)

def binpow(a, b):
	if b == 0:
		return 1
	else:
		res = binpow(a, b // 2)
	if b % 2 != 0:
		return res * res * a
	else:
		return res * res

def binpowmodulus(a, b, m):
	a %= m
	res = 1
	while b > 0:
		if b & 1:
			res = res * a % m
		a = a * a % m
		b >>= 1
	return res

def coprime_to_n(n):
	result = n
	i = 2
	while i * i <= n:
		if n % i == 0:
			while n % i == 0:
				n //= i
			result -= result // i
		i += 1
	if n > 1:
		result -= result // n
	return result

def prime(x):
	if x == 1:
		return False
	else:
		for i in range(2, int(math.sqrt(x)) + 1):
			if x % i == 0:
				return False
		else:
			return True

def luckynumwithequalnumberoffourandseven(x, n, a):
	if x >= n and str(x).count('4') == str(x).count('7'):
		a.append(x)
	elif x < 1000000000000.0:
		luckynumwithequalnumberoffourandseven(x * 10 + 4, n, a)
		luckynumwithequalnumberoffourandseven(x * 10 + 7, n, a)
	return a

def luckynuber(x, n, a):
	p = set(str(x))
	if len(p) <= 2:
		a.append(x)
	if x < n:
		luckynuber(x + 1, n, a)
	return a

def interact(type, x):
	if type == 'r':
		inp = input()
		return inp.strip()
	else:
		print(x, flush=True)

def findTrailingZeros(n):
	count = 0
	while n >= 5:
		n //= 5
		count += n
	return count

def mergeSort(arr):
	if len(arr) > 1:
		mid = len(arr) // 2
		L = arr[:mid]
		R = arr[mid:]
		mergeSort(L)
		mergeSort(R)
		i = j = k = 0
		while i < len(L) and j < len(R):
			if L[i] < R[j]:
				arr[k] = L[i]
				i += 1
			else:
				arr[k] = R[j]
				j += 1
			k += 1
		while i < len(L):
			arr[k] = L[i]
			i += 1
			k += 1
		while j < len(R):
			arr[k] = R[j]
			j += 1
			k += 1
res = set()

def solven(p, l, a, b, n):
	if p > n or l > 10:
		return
	if p > 0:
		res.add(p)
	solven(p * 10 + a, l + 1, a, b, n)
	solven(p * 10 + b, l + 1, a, b, n)

def subsetsUtil(A, subset, index, d):
	print(*subset)
	s = sum(subset)
	d.append(s)
	for i in range(index, len(A)):
		subset.append(A[i])
		subsetsUtil(A, subset, i + 1, d)
		subset.pop(-1)
	return d

def subsetSums(arr, l, r, d, sum=0):
	if l > r:
		d.append(sum)
		return
	subsetSums(arr, l + 1, r, d, sum + arr[l])
	subsetSums(arr, l + 1, r, d, sum)
	return d

def print_factors(x):
	factors = []
	for i in range(1, x + 1):
		if x % i == 0:
			factors.append(i)
	return factors

def calc(X, d, ans, D):
	if len(X) == 0:
		return
	i = X.index(max(X))
	ans[D[max(X)]] = d
	Y = X[:i]
	Z = X[i + 1:]
	calc(Y, d + 1, ans, D)
	calc(Z, d + 1, ans, D)

def factorization(n, l):
	c = n
	if prime(n) == True:
		l.append(n)
		return l
	for i in range(2, c):
		if n == 1:
			break
		while n % i == 0:
			l.append(i)
			n = n // i
	return l

def good(b):
	l = []
	i = 0
	while len(b) != 0:
		if b[i] < b[len(b) - 1 - i]:
			l.append(b[i])
			b.remove(b[i])
		else:
			l.append(b[len(b) - 1 - i])
			b.remove(b[len(b) - 1 - i])
	if l == sorted(l):
		return True
	return False

def generate(st, s):
	if len(s) == 0:
		return
	if s not in st:
		st.add(s)
		for i in range(len(s)):
			t = list(s).copy()
			t.remove(s[i])
			t = ''.join(t)
			generate(st, t)
	return

def main():
	n = inpu()
	cards = lis()
	cards.sort()
	if len(cards) == 1:
		print(-1)
	elif len(set(cards)) == 1:
		print(1)
		print(cards[0])
	elif len(cards) == 2:
		p = cards[0] + cards[1]
		if p % 2 == 0:
			print(3)
			l = [p // 2, cards[0] - (cards[1] - cards[0]), cards[1] + (cards[1] - cards[0])]
			l.sort()
			print(*l)
		else:
			print(2)
			l = [cards[0] - (cards[1] - cards[0]), cards[1] + (cards[1] - cards[0])]
			l.sort()
			print(*l)
	else:
		d = []
		for i in range(1, n):
			cc = cards[i] - cards[i - 1]
			d.append(cc)
		d.sort()
		if len(set(d)) == 1:
			if d[0] != 0:
				print(2)
				print(cards[0] - d[0], cards[-1] + d[0])
			else:
				print(1)
				print(cards[0])
			exit()
		if len(set(d)) > 2 or d[-1] != 2 * d[-2]:
			print(0)
		else:
			print(1)
			for i in range(1, n):
				if cards[i] - cards[i - 1] != d[0]:
					print(cards[i - 1] + d[0])
main()


import sys
t = 1
mod = 10 ** 9 + 7
for __ in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	diff = {}
	d = {}
	for i in range(n - 1):
		diff[l[i + 1] - l[i]] = diff.get(l[i + 1] - l[i], 0) + 1
		if d.get(l[i + 1] - l[i], -1) == -1:
			d[l[i + 1] - l[i]] = []
		d[l[i + 1] - l[i]].append(l[i + 1])
	if len(diff) >= 3:
		print(0)
	elif len(diff) == 2:
		ch = 0
		(o, t) = (0, 0)
		for i in diff:
			if ch == 0:
				o = i
			else:
				t = i
			ch += 1
		ch = 0
		(f, s) = (0, 0)
		cnt = 0
		a1 = []
		if diff[o] == 1 and o % 2 == 0 and (o // 2 == t):
			f = i
			ch1 = 0
			ind1 = 0
			for i in range(n - 1):
				if l[i + 1] - l[i] == o:
					a1.append(l[i] + t)
			cnt += 1
		if diff[t] == 1 and t % 2 == 0 and (t // 2 == o):
			s = o
			ch1 = 0
			ind1 = 0
			for i in range(n - 1):
				if l[i + 1] - l[i] == t:
					a1.append(l[i] + o)
			cnt += 1
		print(len(a1))
		if len(a1) > 0:
			a1.sort()
			print(*a1)
	elif len(diff) == 1:
		a1 = []
		f = 0
		for i in diff:
			f = i
		if diff[f] == 1 and f % 2 == 0:
			a1.append(d[f][-1] - f // 2)
		a1.append(l[0] - f)
		a1.append(l[-1] + f)
		a1.sort()
		if f == 0:
			a1 = []
			a1.append(f + l[0])
		print(len(a1))
		print(*a1)
	else:
		print(-1)


from sys import stdin, stdout
from collections import Counter
nmbr = lambda : int(stdin.readline())
lst = lambda : list(map(int, input().split()))
for _ in range(1):
	n = nmbr()
	f = 1
	a = sorted(lst())
	if n == 1:
		print(-1)
		continue
	if a[0] == a[-1]:
		print(1)
		print(a[0])
		continue
	if n == 2:
		if a[0] + a[1] & 1 == 0:
			b = (a[0] + a[1]) // 2
			d = a[1] - a[0]
			print(3)
			print(a[0] - d, b, a[1] + d)
		else:
			d = a[1] - a[0]
			print(2)
			print(a[0] - d, a[1] + d)
		continue
	dd = Counter(a)
	d1 = a[1] - a[0]
	d2 = a[-1] - a[-2]
	d = min(d1, d2)
	if d == 0:
		print(0)
		continue
	diff = []
	v = a[0]
	p = 0
	while p < n:
		if a[p] != v:
			if a[p] - v == d:
				diff += [v]
				v += d
			else:
				f = 0
				break
		p += 1
		v += d
	if f == 0:
		print(0)
	elif len(diff) == 0:
		print(2)
		print(a[0] - d, a[-1] + d)
	elif len(diff) == 1:
		print(1)
		print(diff[0])
	else:
		print(0)


def sequence_check(m, delta):
	count = 0
	for i in range(1, len(m)):
		if m[i] - m[i - 1] != delta:
			if delta == 0:
				return -2
			mistake = i
			count += 1
		if count == 2 or (m[i] == m[i - 1] and delta != 0):
			return -2
	if delta == 0 and count == 0:
		return -3
	elif delta == 0 and count > 0:
		return -2
	elif count > 0:
		return mistake
	return -1
n = int(input())
m = list(map(int, input().split()))
m.sort()
if n == 1:
	print(-1)
else:
	if len(m) >= 4:
		if m[1] - m[0] == m[2] - m[1]:
			delta = m[1] - m[0]
		elif m[1] - m[0] != m[2] - m[1] and m[1] - m[0] == m[3] - m[2]:
			delta = m[1] - m[0]
		else:
			delta = m[2] - m[1]
	else:
		delta = m[1] - m[0]
		for i in range(1, len(m)):
			if m[i] - m[i - 1] < delta:
				delta = m[i] - m[i - 1]
	result = sequence_check(m, delta)
	if result == -3:
		print(1)
		print(m[0])
	elif result == -2:
		print(0)
	elif result == -1 and n == 2 and (m[0] % 2 == m[1] % 2):
		print(3)
		print(m[0] - delta, (m[0] + m[1]) // 2, m[-1] + delta)
	elif result == -1:
		print(2)
		print(m[0] - delta, m[-1] + delta)
	elif (m[result - 1] + m[result]) % 2 == 0 and (m[result - 1] + m[result]) // 2 == m[result] - delta:
		print(1)
		print(m[result] - delta)
	else:
		print(0)


n = int(input())
arr = [int(x) for x in input().split()]
arr.sort()
if n == 1:
	print(-1)
else:
	ans = []
	if n == 2:
		if (arr[1] - arr[0]) % 2 == 0:
			d = arr[1] - arr[0]
			if d != 0:
				ans.append(arr[0] - d)
				ans.append(arr[0] + d // 2)
				ans.append(arr[1] + d)
			else:
				ans.append(arr[0] + d // 2)
		else:
			d = arr[1] - arr[0]
			ans.append(arr[0] - d)
			ans.append(arr[1] + d)
	else:
		dic = {}
		for i in range(n - 1):
			d = arr[i + 1] - arr[i]
			if d in dic:
				dic[d] += 1
			else:
				dic[d] = 1
		if len(dic) == 1:
			for ele in dic:
				d = ele
				num = dic[ele]
			if d == 0:
				ans.append(arr[0] - d)
			else:
				ans.append(arr[0] - d)
				ans.append(arr[-1] + d)
		elif len(dic) == 2:
			m = float('inf')
			d = -1
			(m1, d2) = (-float('inf'), -1)
			for ele in dic:
				if dic[ele] < m:
					m = dic[ele]
					d = ele
				elif dic[ele] == m:
					if ele > d:
						m = dic[ele]
						d = ele
				if dic[ele] > m1:
					m1 = dic[ele]
					d1 = ele
				elif dic[ele] == m1:
					if ele < d:
						m1 = dic[ele]
						d1 = ele
			if dic[d] == 1:
				if d % 2 == 0 and d // 2 == d1:
					for i in range(n - 1):
						if arr[i + 1] - arr[i] == d:
							ans.append(arr[i] + d // 2)
							break
	if len(ans) == 0:
		print(0)
	else:
		print(len(ans))
		print(*ans)


n = int(input())
a = list(map(int, input().split()))
a.sort()
r = 0
res = []

def isAri(a):
	diff = a[1] - a[0]
	for i in range(len(a) - 1):
		if not a[i + 1] - a[i] == diff:
			return False
	return True
if n == 1:
	print(-1)
elif isAri(a) and a[1] - a[0] == 0:
	r += 1
	print(r)
	print(a[0])
elif isAri(a):
	r += 1
	res.append(a[0] - (a[1] - a[0]))
	r += 1
	res.append(a[len(a) - 1] + (a[1] - a[0]))
	if n == 2 and (a[0] + a[1]) % 2 == 0:
		r += 1
		res.append(int((a[0] + a[1]) / 2))
		res.sort()
	print(r)
	for i in range(0, len(res)):
		print(res[i], end=' ')
else:
	diff = a[1] - a[0]
	if a[1] - a[0] == 2 * (a[2] - a[1]):
		diff = a[2] - a[1]
	errorIndex = -1
	errors = 0
	for i in range(0, len(a) - 1):
		curr = a[i + 1] - a[i]
		if curr != diff:
			errors += 1
			if curr == 2 * diff:
				errorIndex = i
	if errors == 1 and errorIndex != -1:
		print(1)
		print(a[errorIndex] + diff)
	else:
		print(0)


n = int(input())
a = list(map(int, input().split()))
if n == 1:
	print(-1)
else:
	a.sort()
	d = []
	for i in range(n - 1):
		d.append(a[i + 1] - a[i])
	k = list(set(d))
	k.sort()
	uni = {}
	for elem in d:
		if elem not in uni:
			uni[elem] = 1
		else:
			uni[elem] += 1
	if len(k) > 2:
		print(0)
	elif 0 in k:
		if len(k) == 1:
			print(1)
			print(a[0])
		else:
			print(0)
	elif len(k) == 2:
		if uni[k[1]] > 1:
			print(0)
		elif k[1] % 2:
			print(0)
		elif k[1] == 2 * k[0]:
			print(1)
			print(int((a[d.index(k[1]) + 1] + a[d.index(k[1])]) / 2))
		else:
			print(0)
	elif n == 2:
		if k[0] % 2:
			print(2)
			ans = [str(int(a[0] - k[0])), str(int(a[1] + k[0]))]
			print(' '.join(ans))
		else:
			ans = [str(int(a[0] - k[0])), str(int((a[0] + a[1]) / 2)), str(int(a[1] + k[0]))]
			print(3)
			print(' '.join(ans))
	else:
		ans = [str(int(a[0] - k[0])), str(int(a[n - 1] + k[0]))]
		print(2)
		print(' '.join(ans))


n = int(input())
a = [int(i) for i in input().split()]
if n == 1:
	print(-1)
	exit()
a.sort()
if n == 2:
	mid = (a[0] + a[1]) / 2
	if a[0] == a[1]:
		print(1)
		print(a[0])
		exit()
	if mid == int(mid):
		mid = int(mid)
		cd = a[1] - a[0]
		print(3)
		print(a[0] - cd, mid, a[1] + cd)
		exit()
	else:
		print(2)
		cd = a[1] - a[0]
		print(a[0] - cd, a[1] + cd)
	exit()
d = sorted([a[i] - a[i - 1] for i in range(1, n)])
if len(set(d)) == 1:
	if d[0] == 0:
		print(1)
		print(a[0] + d[0])
		exit()
	print(2)
	print(a[0] - d[0], a[n - 1] + d[0])
	exit()
elif len(set(d)) > 2 or d[-1] != 2 * d[-2]:
	print(0)
	exit()
else:
	for i in range(1, n):
		if a[i] - a[i - 1] != d[0]:
			print(1)
			print(a[i - 1] + d[0])
			exit()


n = int(input())
a = sorted(map(int, input().split()))
if n < 2:
	print(-1)
else:
	count = {}
	I = range(n - 1)
	for i in I:
		d = a[i + 1] - a[i]
		count[d] = count.get(d, 0) + 1
	d = min(count)
	if count[d] < n - 2:
		print(0)
	else:
		b = set()
		if count[d] + 1 == n:
			b.add(int(a[0] * 2 - a[1]))
			b.add(int(a[-1] * 2 - a[-2]))
		for i in I:
			e = a[i + 1] - a[i]
			if not e % 2:
				f = e / 2
				count[f] = count.get(f, 0) + 2
				count[e] -= 1
				if count[min(d, f)] == n:
					b.add(int(a[i] + f))
				count[e] += 1
				count[f] -= 2
		print(len(b))
		print(' '.join(map(str, sorted(b))))


def isProgression():
	nonlocal N, A, d, error
	ans = True
	for i in range(N - 1):
		if d != A[i + 1] - A[i]:
			ans = False
			error += 1
	return ans
N = int(input())
A = list((int(i) for i in input().split()))
error = 0
A.sort()
d = (A[N - 1] - A[0]) // N
res = isProgression()
if error == N - 1 and N != 1 and ((A[N - 1] - A[0]) % (N - 1) == 0):
	d = (A[N - 1] - A[0]) // (N - 1)
	error = 0
	res = isProgression()
if N == 1:
	print(-1)
elif N == 2 and (A[0] + A[1]) % 2 == 0 and (A[0] != A[1]):
	print(3)
	d = A[1] - A[0]
	print(A[0] - d, (A[0] + A[1]) // 2, A[1] + d)
elif res == True and d != 0:
	print(2)
	print(A[0] - d, A[N - 1] + d)
elif res == True:
	print(1)
	print(A[0])
elif error > 1:
	print(0)
else:
	for i in range(N - 1):
		if d != A[i + 1] - A[i]:
			if A[i + 1] - A[i] < d:
				print(0)
			elif A[i + 1] - A[i] == 2 * d:
				print(1)
				print((A[i] + A[i + 1]) // 2)
			else:
				print(0)
			break


def main():
	n = int(input())
	if n == 1:
		print(-1)
		return
	elif n == 2:
		(a, b) = list(map(int, input().split()))
		res = {a * 2 - b, b * 2 - a}
		if not a + b & 1:
			res.add((a + b) // 2)
	else:
		l = sorted(map(int, input().split()))
		(d, a) = ({}, -l[-1])
		for (i, b) in enumerate(l):
			(x, a) = (b - a, b)
			(cnt, _) = d.get(x, (0, 0))
			d[x] = (cnt + 1, b)
		t = sorted(d.items())
		if len(t) == 2:
			(y, (_, b)) = t[0]
			res = {l[0] - y, b + y}
		elif len(t) == 3:
			((x, _), (y, (c2, b)), _) = t
			if not x or c2 > 1 or x * 2 != y:
				res = ()
			else:
				res = (b - x,)
		else:
			res = ()
	print(len(res))
	if res:
		print(*sorted(res))

def __starting_point():
	main()
__starting_point()


n = int(input())
arr = list(map(int, input().strip().split()))[:n]
from collections import Counter
arr.sort()
if n == 1:
	print(-1)
elif n == 2:
	d = arr[1] - arr[0]
	if d == 0:
		print(1)
		print(arr[0])
		exit(0)
	if d % 2 == 0:
		print(3)
		print(arr[0] - d, arr[0] + d // 2, arr[1] + d)
	else:
		print(2)
		print(arr[0] - d, arr[1] + d)
else:
	d = []
	for i in range(1, n):
		d.append(arr[i] - arr[i - 1])
	store = Counter(d)
	if len(store) == 1:
		if arr[1] - arr[0] == 0:
			print(1)
			print(arr[0])
			exit(0)
		print(2)
		print(arr[0] - d[0], arr[-1] + d[1])
		exit(0)
	if len(store) > 2:
		print(0)
		exit(0)
	store = sorted(store.items())
	if store[0][1] == 1 or store[1][1] == 1:
		if store[0][1] == 1 and store[0][0] == store[1][0] * 2:
			print(1)
			k = d.index(store[0][0])
			print(arr[k - 1] + store[1][0])
		elif store[1][1] == 1 and store[1][0] == store[0][0] * 2:
			k = d.index(store[1][0])
			print(1)
			print(arr[k] + store[0][0])
		else:
			print(0)
	else:
		print(0)


n = int(input())
a = list(map(int, input().split()))
a.sort()
if n == 1:
	print(-1)
elif n == 2:
	if a[1] == a[0]:
		print(1)
		print(a[0])
		exit(0)
	elif (a[1] - a[0]) % 2 == 0:
		print(3)
		d = a[1] - a[0]
		print(a[0] - d, (a[1] + a[0]) // 2, a[1] + d)
		exit(0)
	else:
		print(2)
		d = a[1] - a[0]
		print(a[0] - d, a[1] + d)
		exit(0)
else:
	d = {}
	d[a[1] - a[0]] = 1
	for i in range(2, n):
		if a[i] - a[i - 1] in d.keys():
			d[a[i] - a[i - 1]] += 1
		elif len(d.keys()) == 1:
			d[a[i] - a[i - 1]] = 1
		else:
			print(0)
			exit(0)
	if len(d.keys()) == 1:
		if max(d.keys()) == 0:
			print(1)
			print(a[0])
		else:
			print(2)
			print(2 * a[0] - a[1], a[-1] + a[1] - a[0])
	elif len(d.keys()) == 2:
		if max(d.keys()) == 2 * min(d.keys()):
			if d[max(d.keys())] == 1:
				print(1)
				for i in range(1, n):
					if a[i] - a[i - 1] == max(d.keys()):
						print(a[i - 1] + min(d.keys()))
						exit(0)
			else:
				print(0)
				exit(0)
		else:
			print(0)
			exit(0)
	else:
		print(0)


n = int(input())
a = list(map(int, input().split()))
a.sort()
if n == 1:
	print(-1)
elif n == 2:
	d = a[1] - a[0]
	if (a[0] + a[1]) % 2 == 0:
		if d == 0:
			print(1)
			print(a[0])
		else:
			print(3)
			print(a[0] - d, (a[0] + a[1]) // 2, a[1] + d)
	else:
		print(2)
		print(a[0] - d, a[1] + d)
else:
	diff = [a[i + 1] - a[i] for i in range(n - 1)]
	maxval = minval = a[1] - a[0]
	maxi = 0
	for i in range(1, n - 1):
		val = a[i + 1] - a[i]
		if val > maxval:
			maxval = val
			maxi = i
		if val < minval:
			minval = val
	n1 = diff.count(minval)
	n2 = diff.count(maxval)
	if n1 == n - 1:
		if minval == 0:
			print(1)
			print(a[0])
		else:
			print(2)
			print(a[0] - minval, a[-1] + minval)
	elif n2 == 1 and n1 == n - 2 and (2 * minval == maxval):
		print(1)
		print(a[maxi] + minval)
	else:
		print(0)


import os
import sys
from io import BytesIO, IOBase
import math

def main():
	pass
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 = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
import os
import sys
from io import BytesIO, IOBase

def main():
	pass
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 = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
n = int(input())
l = list(map(int, input().split()))
l.sort()
if n == 1:
	print(-1)
elif n == 2:
	if l[-1] - l[0] == 0:
		print(1)
		print(l[0])
	elif (l[-1] - l[0]) % 2 == 0:
		d = l[-1] - l[0]
		print(3)
		print(l[0] - d, l[0] + d // 2, l[-1] + d)
	else:
		d = l[-1] - l[0]
		print(2)
		print(l[0] - d, l[1] + d)
else:
	d = l[1] - l[0]
	do = 0
	h = 0
	di = 0
	f = True
	for i in range(1, n):
		if l[i] - l[i - 1] == d:
			di += 1
		elif l[i] - l[i - 1] == d // 2:
			h += 1
		elif l[i] - l[i - 1] == 2 * d:
			do += 1
		else:
			f = False
			break
	if not f:
		print(0)
	elif h == 0 and do == 0:
		if l[1] - l[0] != 0:
			print(2)
			print(l[0] - d, l[-1] + d)
		else:
			print(1)
			print(l[0])
	elif h >= 1 and di == 1 and (do == 0) or (di >= 1 and do == 1 and (h == 0)):
		if h >= 1 and di == 1 and (do == 0):
			if d % 2 == 0:
				print(1)
				for i in range(1, n):
					if l[i] - l[i - 1] == d:
						p = i
						break
				print(l[p - 1] + d // 2)
			else:
				print(0)
		else:
			for i in range(1, n):
				if l[i] - l[i - 1] == 2 * d:
					p = i
					break
			print(1)
			print(l[p - 1] + d)
	else:
		print(0)


n = int(input())
cards = list(map(int, input().split()))
cards.sort()
if n == 1:
	print(-1)
	exit()
if n == 2:
	middle = (cards[1] - cards[0]) // 2
	if (cards[1] - cards[0]) % 2 or cards[1] - cards[0] == 0:
		pass
	else:
		print(3)
		print(cards[0] * 2 - cards[1], (cards[0] + cards[1]) // 2, 2 * cards[1] - cards[0])
		exit()
b = sorted([cards[i] - cards[i - 1] for i in range(1, n)])
if len(set(b)) == 1:
	if b[0] != 0:
		print(2)
		print(cards[0] - b[0], cards[-1] + b[0])
	else:
		print(1)
		print(cards[0])
elif len(set(b)) > 2 or b[-1] != 2 * b[-2]:
	print(0)
else:
	print(1)
	for i in range(1, n):
		if cards[i] - cards[i - 1] != b[0]:
			print(cards[i - 1] + b[0])


n = int(input())
a = [int(i) for i in input().split()]
a = sorted(a)
if len(a) == 1:
	print(-1)
elif len(a) == 2:
	d = a[1] - a[0]
	if d == 0:
		print(1)
		print(a[0])
		return
	elif d % 2 == 0:
		print(3)
		print(a[0] - d, int(a[0] + d / 2), a[1] + d)
		return
	else:
		print(2)
		print(a[0] - d, a[1] + d)
		return
else:
	d = a[1] - a[0]
	d2 = a[2] - a[1]
	if d != d2:
		if len(a) > 3:
			d = a[3] - a[2]
		else:
			d = min(d, d2)
	c = 0
	e = 0
	f = 0
	for i in range(len(a) - 1):
		if a[i + 1] - a[i] != d:
			e = a[i + 1] - a[i]
			f = i
			c += 1
		if c == 2:
			print(0)
			return
	if c == 0:
		if d == 0:
			print(1)
			print(a[0])
			return
		else:
			print(2)
			print(a[0] - d, a[len(a) - 1] + d)
			return
	elif e == 2 * d:
		print(1)
		print(a[f] + d)
		return
	else:
		print(0)
		return


from collections import defaultdict
n = int(input())
arr = [int(i) for i in input().split()]
Dict = defaultdict(int)
arr.sort()
if n == 1:
	print(-1)
elif n == 2:
	if arr[0] != arr[1]:
		diff = arr[1] - arr[0]
		if diff % 2 == 0:
			print(3)
			print(arr[0] - diff, arr[0] + diff // 2, arr[1] + diff)
		else:
			print(2)
			print(arr[0] - diff, arr[1] + diff)
	else:
		print(1)
		print(arr[0])
else:
	for i in range(n - 1):
		diff = arr[i + 1] - arr[i]
		Dict[diff] += 1
	l = list(Dict.values())
	k = list(Dict.keys())
	if len(l) == 1:
		if arr[0] == arr[1]:
			print(1)
			print(arr[0])
		else:
			print(2)
			print(arr[0] - k[0], arr[-1] + k[0])
	elif len(l) == 2:
		if l[0] == 1 or l[1] == 1:
			x = max(k)
			y = min(k)
			if x % 2 == 0 and Dict[x] == 1 and (x // 2 == y):
				for i in range(n - 1):
					diff = arr[i + 1] - arr[i]
					if diff == x:
						print(1)
						print(arr[i] + x // 2)
			else:
				print(0)
		else:
			print(0)
	else:
		print(0)


n = int(input())
t = list(map(int, input().split()))
if n == 1:
	q = '-1'
else:
	t.sort()
	d = min(t[1] - t[0], t[-1] - t[-2])
	q = '2\n' + str(t[0] - d) + ' ' + str(t[-1] + d) if d else '1\n' + str(t[0])
	if n == 2:
		if d and d % 2 == 0:
			q = '3\n' + str(t[0] - d) + ' ' + str(t[0] + d // 2) + ' ' + str(t[-1] + d)
	else:
		for i in range(1, n):
			if t[i] - t[i - 1] != d:
				if t[i] - t[i - 1] == 2 * d and q[0] == '2':
					q = '1\n' + str(t[i] - d)
				else:
					q = '0'
					break
print(q)


n = int(input())
a = list(map(int, input().split()))
if n == 1:
	print(-1)
	return
a.sort()
d = []
for i in range(1, n):
	d.append(a[i] - a[i - 1])
if min(d) == max(d) == 0:
	print(1)
	print(a[0])
elif n == 2:
	if d[0] % 2:
		print(2)
		print(a[0] - d[0], a[1] + d[0])
	else:
		print(3)
		print(a[0] - d[0], a[0] + d[0] // 2, a[1] + d[0])
elif min(d) == max(d):
	print(2)
	print(a[0] - d[0], a[-1] + d[0])
else:
	m1 = 0
	m2 = 0
	for i in range(1, n - 1):
		if d[i] < d[m1]:
			m1 = i
		if d[i] > d[m2]:
			m2 = i
	c = d.count(d[m1])
	if c == n - 2 and d[m1] * 2 == d[m2]:
		print(1)
		print(a[m2] + d[m1])
	else:
		print(0)


import sys
from math import log2, floor, ceil, sqrt, gcd
Ri = lambda : [int(x) for x in sys.stdin.readline().split()]
ri = lambda : sys.stdin.readline().strip()

def input():
	return sys.stdin.readline().strip()

def list2d(a, b, c):
	return [[c] * b for i in range(a)]

def list3d(a, b, c, d):
	return [[[d] * c for j in range(b)] for i in range(a)]

def list4d(a, b, c, d, e):
	return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]

def ceil(x, y=1):
	return int(-(-x // y))

def INT():
	return int(input())

def MAP():
	return map(int, input().split())

def LIST(N=None):
	return list(MAP()) if N is None else [INT() for i in range(N)]

def Yes():
	print('Yes')

def No():
	print('No')

def YES():
	print('YES')

def NO():
	print('NO')
INF = 10 ** 18
MOD = 1000000007
n = int(ri())
a = Ri()
a.sort()
if n == 1:
	print(-1)
elif n == 2:
	cdd = a[1] - a[0]
	if (a[0] + a[1]) % 2 == 0:
		if cdd != 0:
			print(3)
			print(a[0] - cdd, (a[0] + a[1]) // 2, a[1] + cdd)
		else:
			print(1)
			print(a[0])
	else:
		print(2)
		print(a[0] - cdd, a[1] + cdd)
else:
	cd = []
	for i in range(1, n):
		cd.append(a[i] - a[i - 1])
	dic = {}
	cnt = 0
	for i in range(len(cd)):
		if cd[i] in dic:
			dic[cd[i]] += 1
		else:
			cnt += 1
			dic[cd[i]] = 1
	if len(dic) > 2:
		print(0)
	elif len(dic) == 1:
		key = list(dic.keys())[0]
		if key == 0:
			print(1)
			print(a[0])
		else:
			print(2)
			print(a[0] - key, a[-1] + key)
	else:
		lis = list(dic.keys())
		dif = -1
		oth = -1
		if dic[lis[0]] > dic[lis[1]]:
			dif = lis[1]
			oth = lis[0]
		else:
			dif = lis[0]
			oth = lis[1]
		if dic[dif] > 1:
			print(0)
		else:
			flag = -1
			if n == 3:
				if dif / 2 != oth and oth / 2 != dif:
					print(0)
				elif dif / 2 != oth:
					if cd[0] == oth:
						print(1)
						print((a[0] + a[1]) // 2)
					else:
						print(1)
						print((a[1] + a[2]) // 2)
				elif oth / 2 != dif:
					if cd[0] == dif:
						print(1)
						print((a[0] + a[1]) // 2)
					else:
						print(1)
						print((a[1] + a[2]) // 2)
			else:
				for i in range(len(cd)):
					if cd[i] == dif:
						flag = i
						break
				if dif % 2 != 0 or dif // 2 != oth:
					print(0)
				else:
					print(1)
					print((a[flag] + a[flag + 1]) // 2)


n = int(input())
arr = [int(x) for x in input().split()]
arr.sort()
if n == 1:
	print('-1')
elif n == 2:
	diff = arr[1] - arr[0]
	if diff % 2 == 0 and diff != 0:
		print('3')
		print(arr[0] - diff, (arr[0] + arr[1]) // 2, arr[1] + diff)
	elif diff == 0:
		print('1')
		print(arr[0])
	else:
		print('2')
		print(arr[0] - diff, arr[1] + diff)
elif n == 3:
	diff1 = arr[1] - arr[0]
	diff2 = arr[2] - arr[1]
	if diff1 == diff2 and diff1 != 0:
		print('2')
		print(arr[0] - diff1, arr[2] + diff1)
	elif diff1 == diff2 and diff1 == 0:
		print('1')
		print(arr[1])
	elif diff1 == 2 * diff2:
		print('1')
		print(arr[0] + diff2)
	elif diff2 == 2 * diff1:
		print('1')
		print(arr[1] + diff1)
	else:
		print('0')
else:
	diff = dict()
	keys = 0
	for i in range(1, len(arr)):
		cdiff = arr[i] - arr[i - 1]
		if cdiff in diff:
			diff[cdiff] += 1
		else:
			keys += 1
			diff[cdiff] = 1
		if keys > 2:
			break
	if keys > 2:
		print('0')
	elif keys == 1:
		cdiff = list(diff)[0]
		if cdiff == 0:
			print('1')
			print(arr[0])
		else:
			print('2')
			print(arr[0] - cdiff, arr[n - 1] + cdiff)
	elif keys == 2:
		diff1 = list(diff)[0]
		diff2 = list(diff)[1]
		if diff[diff1] > diff[diff2]:
			maxd = diff1
			mind = diff2
		else:
			maxd = diff2
			mind = diff1
		if mind == 2 * maxd and diff[mind] == 1:
			print('1')
			pos = 0
			for i in range(0, len(arr) - 1):
				d = arr[i + 1] - arr[i]
				if d == mind:
					pos = i
					break
			print(arr[pos] + maxd)
		else:
			print('0')


import os
import sys
from io import BytesIO, IOBase
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 = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
from collections import defaultdict
from math import ceil, floor, sqrt, log2, gcd, pi
from heapq import heappush, heappop
from fractions import Fraction
from bisect import bisect_left, bisect
import sys
abc = 'abcdefghijklmnopqrstuvwxyz'
ABC = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
n = int(input())
arr = list(map(int, input().split()))
arr.sort()
d = defaultdict(int)
for i in range(1, n):
	d[arr[i] - arr[i - 1]] += 1
if len(arr) == 1:
	print(-1)
elif len(arr) == 2:
	diff = arr[-1] - arr[0]
	if diff >= 2 and diff % 2 == 0:
		print(3)
		print(arr[0] - arr[-1] + arr[0], (arr[0] + arr[-1]) // 2, arr[-1] + arr[-1] - arr[0])
	elif diff != 0:
		print(2)
		print(arr[0] - arr[-1] + arr[0], arr[-1] + arr[-1] - arr[0])
	else:
		print(1)
		print(arr[0])
elif len(d) > 2:
	print(0)
elif len(d) == 1:
	if min(arr) != max(arr):
		print(2)
		print(arr[0] - arr[1] + arr[0], arr[-1] + arr[-1] - arr[-2])
	else:
		print(1)
		print(max(arr))
elif len(d) == 2:
	a = list(d.keys())
	a.sort()
	if a[-1] == 2 * a[0] and d[a[1]] == 1:
		print(1)
		for i in range(1, n):
			if arr[i] - arr[i - 1] != a[0]:
				print(arr[i - 1] + a[0])
				break
	else:
		print(0)


from collections import defaultdict, deque, Counter
from sys import stdin, stdout
from heapq import heappush, heappop
import math
import io
import os
import math
import bisect

def isPrime(x):
	for i in range(2, x):
		if i * i > x:
			break
		if x % i == 0:
			return False
	return True

def ncr(n, r, p):
	num = den = 1
	for i in range(r):
		num = num * (n - i) % p
		den = den * (i + 1) % p
	return num * pow(den, p - 2, p) % p

def primeFactors(n):
	l = []
	while n % 2 == 0:
		l.append(2)
		n = n / 2
	for i in range(3, int(math.sqrt(n)) + 1, 2):
		while n % i == 0:
			l.append(int(i))
			n = n / i
	if n > 2:
		l.append(n)
	return list(set(l))

def power(x, y, p):
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def sieve(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	return prime

def digits(n):
	c = 0
	while n > 0:
		n //= 10
		c += 1
	return c

def ceil(n, x):
	if n % x == 0:
		return n // x
	return n // x + 1

def mapin():
	return map(int, input().split())
n = int(input())
a = [int(x) for x in input().split()]
if n == 1:
	print(-1)
else:
	a.sort()
	ans = []
	ll = []
	aa = 0
	for i in range(1, n):
		ll.append(a[i] - a[i - 1])
	if len(set(ll)) == 1:
		ans.append(a[0] - (a[1] - a[0]))
		ans.append(a[-1] + (a[1] - a[0]))
		if len(a) == 2:
			if (a[-1] + a[0]) % 2 == 0:
				ans.append((a[-1] + a[0]) // 2)
	elif len(set(ll)) == 2:
		k = max(ll)
		if ll.count(k) == 1 and k // 2 == min(ll):
			for i in range(len(ll)):
				if ll[i] == k:
					if (a[i + 1] + a[i]) % 2 == 0:
						ans.append((a[i + 1] + a[i]) // 2)
	ans = list(set(ans))
	print(len(ans))
	ans.sort()
	print(*ans)


import statistics
(n, values, diff) = (int(input()), sorted([int(i) for i in input().split()]), [])
for i in range(n - 1):
	diff.append(values[i + 1] - values[i])
diff_len = len(set(diff))
if n == 1:
	print(-1)
elif diff_len == 1:
	if diff[0] == 0:
		works = [values[-1] + diff[0]]
		print(len(works))
		print(*sorted(works))
	else:
		works = [values[0] - diff[0], values[-1] + diff[0]]
		if n == 2:
			if not (values[0] + values[1]) % 2:
				works.append((values[0] + values[1]) // 2)
		print(len(works))
		print(*sorted(works))
elif diff_len == 2:
	(common, works) = (min(statistics.multimode(diff)), [])
	if common:
		for i in range(1, n):
			if values[i - 1] + common == values[i] - common:
				works.append(values[i - 1] + common)
	if len(works) > 1:
		works = []
	print(len(works))
	if works:
		print(*sorted(works))
else:
	print(0)


import math
from decimal import *
getcontext().prec = 30
n = int(input())
a = list(map(int, input().split()))
a.sort()
if n == 1:
	print(-1)
elif n == 2:
	cd = a[1] - a[0]
	if cd == 0:
		print(1)
		print(a[0])
	elif cd % 2 == 0:
		print(3)
		print(a[0] - cd, (a[0] + a[1]) // 2, a[1] + cd)
	else:
		print(2)
		print(a[0] - cd, a[1] + cd)
else:
	cd = list()
	for i in range(1, len(a)):
		cd.append(a[i] - a[i - 1])
	x = set(cd)
	if len(x) == 1:
		if cd[0] == 0:
			print(1)
			print(a[0])
		else:
			print(2)
			print(a[0] - cd[0], a[n - 1] + cd[0])
	elif len(x) > 2:
		print(0)
	else:
		values = list()
		for val in x:
			values.append(val)
		values.sort()
		if values[1] != values[0] * 2 or cd.count(values[1]) > 1:
			print(0)
		else:
			for i in range(n - 1):
				if cd[i] == values[1]:
					print(1)
					print((a[i + 1] + a[i]) // 2)
					break


n = int(input())
a = list(map(int, input().split()))
a.sort()
cnt = 0
if n == 1:
	print(-1)
	return
if n == 2:
	if (a[1] - a[0]) % 2 == 0 and a[1] != a[0]:
		print(3)
		print(2 * a[0] - a[1], (a[0] + a[1]) // 2, 2 * a[1] - a[0])
		return
d = sorted([a[i] - a[i - 1] for i in range(1, n)])
if len(set(d)) == 1:
	if d[0] != 0:
		print(2)
		print(a[0] - d[0], a[-1] + d[0])
	else:
		print(1)
		print(a[0])
	return
if len(set(d)) > 2 or d[-1] != 2 * d[-2]:
	print(0)
else:
	print(1)
	for i in range(1, n):
		if a[i] - a[i - 1] != d[0]:
			print(a[i - 1] + d[0])


n = int(input())
l = list(map(int, input().split()))
l = sorted(l)
if n == 1:
	print(-1)
	exit()
if n == 2:
	if (l[1] - l[0]) % 2 == 0:
		if l[1] - l[0] == 0:
			print(1)
			print(l[0])
			exit()
		print(3)
		print(l[0] - (l[1] - l[0]), l[0] + (l[1] - l[0]) // 2, l[1] + (l[1] - l[0]))
	else:
		print(2)
		print(l[0] - (l[1] - l[0]), l[1] + (l[1] - l[0]))
	exit()
q = {}
for i in range(1, n):
	q[l[i] - l[i - 1]] = q.get(l[i] - l[i - 1], 0) + 1
d1 = q
q = list(q)
q = sorted(q)
if len(q) == 1:
	if q[0] == 0:
		print(1)
		print(l[0])
	else:
		print(2)
		print(l[0] - q[0], l[-1] + q[0])
elif q[0] * 2 == q[1] and len(q) == 2 and (d1[q[1]] == 1):
	print(1)
	for i in range(1, n):
		if l[i] - l[i - 1] == q[1]:
			print(l[i] - q[0])
			exit()
else:
	print(0)


from sys import stdin
input = stdin.readline

def ap(arr):
	if len(arr) == 1:
		return -1
	dif = []
	ans = []
	arr = sorted(arr)
	l = set()
	for i in range(0, len(arr) - 1):
		d = arr[i + 1] - arr[i]
		dif.append(d)
		l.add(d)
		if len(l) > 2:
			return 0
	if len(set(dif)) == 1:
		if dif[0] == 0:
			ans.append(arr[0])
			print(len(ans))
			print(*ans)
			return ''
		else:
			ans.append(arr[0] - dif[0])
			ans.append(arr[-1] + dif[0])
			if len(arr) > 3:
				print(len(ans))
				print(*ans)
				return ''
	mini = max(dif)
	maxi = min(dif)
	if mini / 2 != maxi and len(set(dif)) >= 2:
		return 0
	if len(arr) == 2 and len(set(dif)) == 1:
		if (arr[0] + arr[1]) % 2 == 0:
			d = (arr[0] + arr[1]) // 2
			ans.append(d)
	if maxi == 0 and len(set(dif)) >= 2:
		return 0
	if len(set(dif)) == 2:
		if dif.count(mini) == 1 and mini != 0:
			for i in range(0, len(arr) - 1):
				if arr[i + 1] - arr[i] == mini:
					ans.append(arr[i] + maxi)
		else:
			return 0
	ans = sorted(ans)
	if len(set(dif)) > 2:
		return 0
	print(len(ans))
	print(*ans)
	return ''
a = input()
lst = list(map(int, input().strip().split()))
print(ap(lst))


n = int(input())
a = list(map(int, input().split()))
if n == 1:
	print(-1)
	return
a.sort()
d = a[1] - a[0]
if n == 2:
	if d == 0:
		print(1)
		print(a[0])
	elif d % 2 == 1:
		print(2)
		print(a[0] - d, a[1] + d)
	else:
		print(3)
		print(a[0] - d, sum(a) // 2, a[1] + d)
	return
d_list = [a[i] - a[i - 1] for i in range(1, n)]
d2c = {}
for d in d_list:
	if d not in d2c:
		d2c[d] = 1
	else:
		d2c[d] += 1
if len(d2c) == 1:
	(d1, c1) = d2c.popitem()
	if d1 == 0:
		print(1)
		print(a[0])
	else:
		print(2)
		print(a[0] - d, a[-1] + d)
	return
if len(d2c) == 2:
	(d1, c1) = d2c.popitem()
	(d2, c2) = d2c.popitem()
	if c1 == 1 and d1 == d2 * 2:
		print(1)
		print(a[d_list.index(d1)] + d2)
	elif c2 == 1 and d2 == d1 * 2:
		print(1)
		print(a[d_list.index(d2)] + d1)
	else:
		print(0)
else:
	print(0)


from __future__ import division, print_function
import os
import sys
from io import BytesIO, IOBase
from math import inf

def main():

	def constantProgression(r):
		if r == 0:
			for i in range(1, n):
				if numbers[i] != numbers[i - 1]:
					return False
			return True
		else:
			return False

	def getMissingNumber(r):
		if not r.is_integer():
			return inf
		r = int(r)
		missing = None
		for i in range(n - 1):
			if numbers[i] + r != numbers[i + 1]:
				if missing == None:
					missing = numbers[i] + r
				else:
					return inf
		return missing
	n = int(input())
	numbers = [int(x) for x in input().split()]
	numbers.sort()
	if n == 1:
		print(-1)
	elif n == 2:
		r = numbers[1] - numbers[0]
		if constantProgression(r):
			print(f'1\n{numbers[0]}')
			return
		if r & 1:
			print(f'2\n{numbers[0] - r} {numbers[1] + r}')
		else:
			print(f'3\n{numbers[0] - r} {(numbers[0] + numbers[1]) // 2} {numbers[1] + r}')
	else:
		expectedR = (numbers[-1] - numbers[0]) / (n - 1)
		if constantProgression(expectedR):
			print(f'1\n{numbers[0]}')
			return
		missing = getMissingNumber(expectedR)
		if missing == None:
			print(f'2\n{numbers[0] - int(expectedR)} {numbers[-1] + int(expectedR)}')
		else:
			expectedR = (numbers[-1] - numbers[0]) / n
			missing = getMissingNumber(expectedR)
			if missing == inf:
				print(0)
			else:
				print(f'1\n{missing}')
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 = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
input = lambda : sys.stdin.readline().rstrip('\r\n')

def print(*args, **kwargs):
	sep = kwargs.pop('sep', ' ')
	file = kwargs.pop('file', sys.stdout)
	atStart = True
	for x in args:
		if not atStart:
			file.write(sep)
		file.write(str(x))
		atStart = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
main()


from sys import stdin
import math

def check_for_ap(arr, n):
	diff = arr[1] - arr[0]
	for i in range(2, n):
		if arr[i] - arr[i - 1] != diff:
			return False
	return True

def get_diff(arr):
	return arr[1] - arr[0]

def get_difference(arr, n):
	difference = []
	for i in range(1, n):
		difference.append(arr[i] - arr[i - 1])
	return difference

def insert_into(arr, n):
	difference = get_difference(arr, n)
	culprit = max(difference)
	for i in range(1, n):
		if arr[i] - arr[i - 1] == culprit:
			num = (arr[i] + arr[i - 1]) // 2
			arr.insert(i, (arr[i] + arr[i - 1]) // 2)
			if check_for_ap(arr, n + 1):
				print(1)
				print(num)
				exit()
			else:
				print(0)
				exit()
n = int(stdin.readline().strip())
arr = list(map(int, stdin.readline().split()))
arr.sort()
if len(arr) == 1:
	print(-1)
	exit()
elif check_for_ap(arr, n):
	if len(arr) == 2:
		if (arr[1] - arr[0]) % 2 == 0:
			diff = get_diff(arr)
			if diff == 0:
				print(1)
				print(arr[0])
				exit()
			print(3)
			print(arr[0] - diff, (arr[0] + arr[1]) // 2, arr[1] + diff)
		else:
			diff = arr[1] - arr[0]
			if diff == 0:
				print(1)
				print(arr[0])
				exit()
			print(2)
			print(arr[0] - diff, arr[1] + diff)
	else:
		diff = get_diff(arr)
		if diff == 0:
			print(1)
			print(arr[0])
			exit()
		print(2)
		print(arr[0] - diff, arr[-1] + diff)
else:
	insert_into(arr, n)


from collections import defaultdict
n = int(input())
arr = sorted(list(map(int, input().split())))

def isAP(arr):
	d = arr[1] - arr[0]
	for i in range(1, len(arr)):
		if d != arr[i] - arr[i - 1]:
			return False
	return True
ans = []
if n == 1:
	print(-1)
elif n == 2:
	d = arr[1] - arr[0]
	if d == 0:
		ans = [arr[0]]
	elif d % 2 == 0:
		d //= 2
		ans = [arr[0] - d * 2, arr[0] + d, arr[1] + d * 2]
	else:
		ans = [arr[0] - d, arr[1] + d]
elif isAP(arr):
	d = arr[1] - arr[0]
	if d == 0:
		ans.append(arr[0])
	else:
		ans = [arr[0] - d, arr[-1] + d]
else:
	diff = defaultdict(int)
	for i in range(1, n):
		d = arr[i] - arr[i - 1]
		diff[d] += 1
	d = diff.keys()
	if len(d) > 2:
		print(0)
	elif min(d) * 2 != max(d) or diff[max(d)] > 1:
		print(0)
	elif 0 in diff.values():
		ans.append(arr[0])
	else:
		d = max(d)
		for i in range(1, n):
			if arr[i] - arr[i - 1] == d:
				ans = [arr[i - 1] + d // 2]
				break
if len(ans) != 0:
	print(len(ans))
	print(*ans)


for _ in range(1):
	n = int(input())
	arr = [int(i) for i in input().split()]
	arr.sort()
	l = []
	if n == 1:
		print(-1)
	elif n == 2:
		if arr[1] - arr[0] == 0:
			print(1)
			print(arr[0])
		elif (arr[1] - arr[0]) % 2 == 0:
			print(3)
			print(2 * arr[0] - arr[1], (arr[0] + arr[1]) // 2, 2 * arr[1] - arr[0])
		else:
			print(2)
			print(2 * arr[0] - arr[1], 2 * arr[1] - arr[0])
	else:
		for i in range(n - 1):
			l.append(arr[i + 1] - arr[i])
		if len(set(l)) == 1 and l[0] == 0:
			print(1)
			print(arr[0])
		elif len(set(l)) == 1:
			print(2)
			print(2 * arr[0] - arr[1], 2 * arr[n - 1] - arr[n - 2])
		elif len(set(l)) == 2:
			l = list(set(l))
			l.sort()
			if l[0] * 2 == l[1]:
				count = 0
				for i in range(n - 1):
					if arr[i + 1] - arr[i] == l[1]:
						count += 1
						index = i
				if count == 1:
					print(1)
					print(arr[index] + l[0])
				else:
					print(0)
			else:
				print(0)
		else:
			print(0)


n = int(input())
temparr = input()
temparr = temparr.split()
arr = []
for i in temparr:
	arr.append(int(i))
arr = sorted(arr)
if n == 1:
	print(-1)
elif n == 2:
	diff = arr[1] - arr[0]
	if diff & 1:
		print(2)
		ans = str(arr[0] - diff) + ' ' + str(arr[1] + diff)
		print(ans)
	elif diff == 0:
		print(1)
		print(arr[0])
	else:
		print(3)
		half = diff // 2
		midd = arr[0] + half
		ans = str(arr[0] - diff) + ' ' + str(midd) + ' ' + str(arr[1] + diff)
		print(ans)
else:
	dicts = {}
	for i in range(1, n):
		diff = arr[i] - arr[i - 1]
		if diff not in dicts:
			dicts[diff] = 1
		else:
			dicts[diff] += 1
	if len(dicts) >= 3:
		print('0')
	elif len(dicts) >= 2 and 0 in dicts:
		print('0')
	elif len(dicts) == 1:
		if arr[1] - arr[0] == 0:
			print('1')
			print(arr[0])
		else:
			print('2')
			first = arr[0] - diff
			last = arr[-1] + diff
			strsans = str(first) + ' ' + str(last)
			print(strsans)
	else:
		flag = 0
		firstkey = 0
		firstval = 0
		seckey = 0
		secval = 0
		for (key, value) in dicts.items():
			if flag == 0:
				firstval = value
				firstkey = key
				flag = 1
			else:
				secval = value
				seckey = key
		lowerkey = min(firstkey, seckey)
		higherkey = max(firstkey, seckey)
		firstkey = lowerkey
		seckey = higherkey
		secval = dicts[higherkey]
		firstval = dicts[lowerkey]
		if firstval >= 1 and secval >= 2:
			print('0')
		else:
			minskey = min(firstkey, seckey)
			maxskey = max(firstkey, seckey)
			if minskey * 2 != maxskey:
				print(0)
			else:
				ans = 0
				for i in range(1, n):
					if arr[i] - arr[i - 1] == maxskey:
						ans = arr[i - 1] + minskey
						break
				print(1)
				print(ans)


n = int(input())
list_numbers = list(map(int, input().split()))
list_numbers.sort()

def ap(list_numbers, n):
	done = False
	if n == 1:
		done = True
		return print(-1)
	if n == 2:
		if (list_numbers[0] + list_numbers[1]) % 2 == 0:
			x = int((list_numbers[0] + list_numbers[1]) / 2)
			y = list_numbers[1] - list_numbers[0]
			if list_numbers[0] - y == x == list_numbers[1] + y:
				print(1)
				print(x)
				done = True
			else:
				print(3)
				print(str(list_numbers[0] - y) + ' ' + str(x) + ' ' + str(list_numbers[1] + y))
				done = True
		else:
			y = list_numbers[1] - list_numbers[0]
			print(2)
			print(str(list_numbers[0] - y) + ' ' + str(list_numbers[1] + y))
			done = True
	i = 0
	i_to_use = 1
	previous_num = 0
	difference = ' '
	difference_2 = ' '
	if n > 2:
		if list_numbers[2] - list_numbers[1] < list_numbers[1] - list_numbers[0]:
			difference_2 = list_numbers[1] - list_numbers[0]
			difference = list_numbers[2] - list_numbers[1]
			for j in list_numbers:
				if i < 3:
					previous_num = j
					i += 1
				elif difference == ' ':
					difference = j - previous_num
					previous_num = j
					i += 1
				elif difference != j - previous_num:
					if difference_2 == ' ':
						difference_2 = j - previous_num
						i_to_use = i
						i += 1
						continue
					else:
						print(0)
						done = True
						break
				else:
					previous_num = j
					i += 1
		else:
			for j in list_numbers:
				if i == 0:
					previous_num = j
					i += 1
				elif difference == ' ':
					difference = j - previous_num
					previous_num = j
					i += 1
				elif difference != j - previous_num:
					if difference_2 == ' ':
						difference_2 = j - previous_num
						i_to_use = i
						i += 1
						previous_num = j
						continue
					else:
						print(str(0))
						done = True
						break
				else:
					previous_num = j
					i += 1
	if not done:
		if difference_2 == ' ':
			if list_numbers[0] - difference == list_numbers[-1] + difference:
				print(1)
				print(str(list_numbers[0] - difference))
			else:
				print(2)
				print(str(list_numbers[0] - difference) + ' ' + str(list_numbers[-1] + difference))
		elif difference_2 == difference * 2:
			print(1)
			print(list_numbers[i_to_use - 1] + difference)
		else:
			print(str(0))
ap(list_numbers, n)


n = int(input())
num = [int(k) for k in input().split()]
num.sort()
diff = [0] * (n - 1)
for i in range(n - 1):
	diff[i] = num[i + 1] - num[i]
if n == 1:
	print(-1)
elif len(diff) > 1:
	same = True
	for i in range(len(diff) - 1):
		if diff[i] != diff[i + 1]:
			same = False
	if same == True:
		if diff[0] == 0:
			print(1)
			print(num[0])
		else:
			print(2)
			print(num[0] - diff[0], num[n - 1] + diff[0])
	elif diff.count(diff[diff.index(min(diff))]) != len(diff) - 1:
		print(0)
	elif 2 * diff[diff.index(min(diff))] != diff[diff.index(max(diff))]:
		print(0)
	else:
		print(1)
		print(num[diff.index(max(diff))] + diff[diff.index(min(diff))])
elif len(diff) == 1:
	if diff[0] == 0:
		print(1)
		print(num[0])
	elif (num[0] + num[1]) / 2 % 1 == 0:
		print(3)
		print(num[0] - diff[0], int((num[0] + num[1]) / 2), num[1] + diff[0])
	else:
		print(2)
		print(num[0] - diff[0], num[1] + diff[0])