Akshay is interested in mathematics, one day he came across a problem of modulus operator.He has  a list of M integers say arr[M] and has to find all integers K such that :
- K > 1
- arr[1]%K = arr[2]%K = arr[3]%K = … = arr[M]%K where '%' is a modulus operator.
Help Akshay to find all such K's.

-----Input:-----
- First line of input contains an integer M. Then M lines follow each containing one integer of the list. Input data is such that at least one integer K will always exist.

-----Output:-----
- Output all possible integers K separated by space in increasing order.

-----Constraints-----
- 2<= M <=100
- 1< value of each integer <109
- All integers will be distinct

-----Sample Input:-----
3
38
6
34

-----Sample Output:-----
2 4

Source: codechef | Difficulty: UNKNOWN_DIFFICULTY


Solutions:
l = []
for _ in range(int(input())):
	l.append(int(input()))
for i in range(2, max(l)):
	r = [x % i for x in l]
	if len(set([x % i for x in l])) == 1:
		print(i, end=' ')


def find_gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x

def print_factors(x):
	for i in range(2, x + 1):
		if x % i == 0:
			print(i, end=' ')
t = int(input())
l = []
for i in range(t):
	n = int(input())
	l.append(n)
l2 = []
i = 0
for i in range(t - 1):
	l2.append(abs(l[i + 1] - l[i]))
num1 = l2[0]
num2 = l2[1]
gcd = find_gcd(num1, num2)
for i in range(2, len(l2)):
	gcd = find_gcd(gcd, l2[i])
print_factors(gcd)


m = int(input())
a = []
for i in range(m):
	a.append(int(input()))
ma = max(a)
x = a.index(ma)
k = max(a[:x] + a[x + 1:])
for i in range(2, k):
	flag = 1
	for j in range(m - 1):
		if a[j] % i != a[j + 1] % i:
			flag = 0
			break
	if flag == 1:
		print(i, end=' ')


M = int(input())
ls = []
ans = []
k = 2
for i in range(M):
	ls.append(int(input()))
for i in range(max(ls)):
	titu = ls[0] % k
	tmp = list(filter(lambda x: x % k == titu, ls))
	if len(tmp) == len(ls):
		ans.append(k)
	k += 1
for i in ans:
	print(i, end=' ')


l = []
for _ in range(int(input())):
	l.append(int(input()))
ran = max(l)
s = set()
out = []
for i in range(2, ran + 1):
	s.clear()
	for j in l:
		s.add(j % i)
	if len(s) == 1:
		out.append(i)
out.sort()
print(*out)


n = int(input())
l = []
ll = []
ans = []
for i in range(n):
	x = int(input())
	l.append(x)
for i in range(n):
	for j in range(i + 1, n):
		if l[j] - l[i] > 0:
			ll.append(l[j] - l[i])
		else:
			ll.append(l[i] - l[j])
ll.sort()
for i in range(2, int(ll[0] ** 0.5) + 1):
	if i * i > ll[0]:
		break
	if ll[0] % i == 0:
		ans.append(i)
		ans.append(ll[0] // i)
ans.append(ll[0])
ans = list(set(ans))
ans.sort()
print(*ans)


n = int(input())
l = [int(input().strip()) for _ in range(n)]
for k in range(2, max(l)):
	if len(set((e % k for e in l))) == 1:
		print(k, end=' ')