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
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(gcd) 
print_factors(gcd)



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(gcd) 
print_factors(gcd)


