There were $n$ types of swords in the theater basement which had been used during the plays. Moreover there were exactly $x$ swords of each type. $y$ people have broken into the theater basement and each of them has taken exactly $z$ swords of some single type. Note that different people might have taken different types of swords. Note that the values $x, y$ and $z$ are unknown for you.

The next morning the director of the theater discovers the loss. He counts all swords — exactly $a_i$ swords of the $i$-th type are left untouched.

The director has no clue about the initial number of swords of each type in the basement, the number of people who have broken into the basement and how many swords each of them have taken.

For example, if $n=3$, $a = [3, 12, 6]$ then one of the possible situations is $x=12$, $y=5$ and $z=3$. Then the first three people took swords of the first type and the other two people took swords of the third type. Note that you don't know values $x, y$ and $z$ beforehand but know values of $n$ and $a$.

Thus he seeks for your help. Determine the minimum number of people $y$, which could have broken into the theater basement, and the number of swords $z$ each of them has taken.


-----Input-----

The first line of the input contains one integer $n$ $(2 \le n \le 2 \cdot 10^{5})$ — the number of types of swords.

The second line of the input contains the sequence $a_1, a_2, \dots, a_n$ $(0 \le a_i \le 10^{9})$, where $a_i$ equals to the number of swords of the $i$-th type, which have remained in the basement after the theft. It is guaranteed that there exists at least one such pair of indices $(j, k)$ that $a_j \neq a_k$.


-----Output-----

Print two integers $y$ and $z$ — the minimum number of people which could have broken into the basement and the number of swords each of them has taken.


-----Examples-----
Input
3
3 12 6

Output
5 3

Input
2
2 9

Output
1 7

Input
7
2 1000000000 4 6 8 4 2

Output
2999999987 2

Input
6
13 52 0 13 26 52

Output
12 13



-----Note-----

In the first example the minimum value of $y$ equals to $5$, i.e. the minimum number of people who could have broken into the basement, is $5$. Each of them has taken $3$ swords: three of them have taken $3$ swords of the first type, and two others have taken $3$ swords of the third type.

In the second example the minimum value of $y$ is $1$, i.e. the minimum number of people who could have broken into the basement, equals to $1$. He has taken $7$ swords of the first type.

Difficulty: introductory

Starter code:

Solutions:
from bisect import *
from collections import *
from itertools import *
import functools
import sys
import math
from decimal import *
from copy import *
from heapq import *
getcontext().prec = 30
MAX = sys.maxsize
MAXN = 10**6+1
MOD = 10**9+7
spf = [i for i in range(MAXN)]
def sieve():
    for i in range(2,MAXN,2):
        spf[i] = 2
    for i in range(3,int(MAXN**0.5)+1):
        if spf[i]==i:
            for j in range(i*i,MAXN,i):
                if spf[j]==j:
                    spf[j]=i

def mhd(a,b):
    return abs(a[0]-b[0])+abs(b[1]-a[1])

def charIN(x= ' '):
    return(sys.stdin.readline().strip().split(x))

def arrIN(x = ' '):
    return list(map(int,sys.stdin.readline().strip().split(x)))

def eld(x,y):
    a = y[0]-x[0]
    b = x[1]-y[1]
    return (a*a+b*b)**0.5

def lgcd(a):
    g = a[0]
    for i in range(1,len(a)):
        g = math.gcd(g,a[i])
    return g

def ms(a):
    msf = -MAX
    meh = 0
    st = en = be = 0
    for i in range(len(a)):
        meh+=a[i]
        if msf<meh:
            msf = meh
            st = be
            en = i
        if meh<0:
            meh = 0
            be = i+1
    return msf,st,en

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

    return (num*(pow(den,MOD-2,MOD)))%MOD



def flush():
    return sys.stdout.flush()

'''*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*'''
n = int(input())
a = arrIN()
mx = max(a)
cnt = 0
temp = []
for i in a:
    cnt+=mx-i
    temp.append(mx-i)
g = lgcd(temp)
print(cnt//g,g)





import sys
input = sys.stdin.readline

n = int(input())
a = list(map(int,input().split()))

def gcd(a, b):  
    while b:
        a, b = b, a%b
    return a

def gcdL(l):
    while len(l) != 1:
        a = l.pop()
        b = l.pop()
        l.append(gcd(a,b))
    return l[0]

M = max(a)
l2 = [M - i for i in a if i != M]
tot = sum(l2)
small = gcdL(l2)

print(tot//small, small)



n=int(input())
li=list(map(int,input().split()))
b=max(li)
c=[]
n1=0
for i in li:
    if i!=b:
        c.append(b-i)
        n1+=1
import math
if n1==0:
    print(0,0)
else:
    a1=c[0]
    for i in c:
        a1=math.gcd(i,a1)
print(sum(c)//a1,a1)
    


def gcd(a,b):
    if (a == 0): return b;
    else: return gcd(b % a, a); 
n=int(input())
a=input().split()
for i in range(n):
    a[i]=int(a[i])
maxi=max(a)    
b=gcd(maxi-a[0],maxi-a[1])
for j in range(2,n):
    b=gcd(b,maxi-a[j])
ans=0
for i in range(n):
    ans+=(maxi-a[i])//b
print(ans,b)    

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


n = int(input())
s = list(map(int, input().split()))
m = max(s)
c = list(filter(lambda x: x>0,map(lambda x: m - x, s)))
d = 0
for j in c:
    d = nod(d,j)
ans = 0
for j in c:
    ans+=j//d
print(ans,d)

'''input
6
13 52 0 13 26 52
'''
from sys import stdin
import math


# main starts
n = int(stdin.readline().strip())
arr = list(map(int, stdin.readline().split()))
aux = []
mx = max(arr)
for i in arr:
	aux.append(mx - i)

g = aux[0]
for i in range(1,len(aux)):
	g = math.gcd(g, aux[i])

p = 0
for i in aux:
	p += i // g
print(p, g)

from math import gcd
n=int(input())
a=list(map(int,input().split()))
d=max(a)
s=0
k=0
for i in range(n):
    s+=d-a[i]
    k=gcd(k,d-a[i])
print(s//k,k)

import math
n = int(input())
a = list(map(int,input().split()))
l = max(a)
c = []
for i in range(len(a)):
    c.append(l-a[i])
p = 0
for i in range(len(c)):
    p = math.gcd(p,c[i])
o = sum(c)
print(o//p,p)


from math import gcd
n = int(input())
a = sorted(list(map(int,input().split())))
s = sum(a)-a[n-1]
t = a[n-1]*(n-1)
ans = t-s
g = a[n-1]-a[0]
for i in range(1,n-1):
    g = gcd(a[n-1]-a[i],g)
print(ans//g,g)


from math import gcd
n=int(input())
a=[int(x) for x in input().split()]
boss=max(a)
arr=0
g=0
for i in range(n):
    a[i]=boss-a[i]
    g=gcd(g,a[i])
for item in a:
    arr+=item//g
print(arr,g)
    


ll = lambda:list(map(int, input().split()))
from fractions import gcd
from functools import reduce
def find_gcd(list):
    x = reduce(gcd, list)
    return x
testcases = 1
# [testcases] = ll()
for _ in range(testcases):
	[n] = ll()
	a = ll()
	amax = max(a)
	l = []
	ans = 0
	for x in range(n):
		if not amax ==a[x]:
			# ans +=(amax-a[x])
			l.append(amax-a[x])
	h = find_gcd(l)
	# print(h)
	for x in range(n):
		if not amax ==a[x]:
			ans+=((amax-a[x])//h)
	print(ans,h)


from functools import reduce
def gcd(a,b):
	if not b:
		return a
	return gcd(b,a%b)

n=int(input())
arr=[int(x) for x in input().split(' ')]
mx=max(arr)
arr=[mx-x for x in arr if mx-x]
GCD=reduce(gcd,arr)
print(sum(arr)//GCD,GCD)

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

n = int(input())
a = list(map(int, input().split()))

maxa = max(a)

r = [maxa - x for x in a]

z = r[0]
for i in range(1, n):
    z = gcd(z, r[i])

y = sum(r) // z
print(y, z)


from math import gcd
n=int(input())
a=list(map(int,input().split()))
ma=max(a)
y=0
z=0
for i in a:
    z=gcd(z,ma-i)
for i in a:
    y+=(ma-i)//z
print(y,z)
    


def gcd(a,b):
    if b==0: return a 
    return gcd(b,a%b)
n=int(input())
l=[int(i) for i in input().split()]
#x total 
#y*z taken 
m=max(l)
d=[m-i for i in l]
g=0 
sm=sum(d)
for i in d:
    g=gcd(i,g)
print(sm//g,g)

import sys
input = sys.stdin.readline
n=int(input())
A=list(map(int,input().split()))

x=max(A)

from math import gcd

z=0
SUM=0
for a in A:
    z=gcd(z,x-a)
    SUM+=x-a

y=SUM//z

print(y,z)


from math import gcd
from functools import reduce


def gcd_list(a):
    ans = reduce(gcd, a)
    return ans


n = int(input())
a = list(map(int, input().split()))
mn = min(a)
a = [el - mn for el in a]
z = gcd_list(a)
mx = max(a)
y = 0
for el in a:
    y += (mx - el) // z
print(y, z)


import math
from functools import reduce

l = int(input())

arr = list([int(x) for x in input().split(' ')])

cel = max(arr)
nwd = reduce(lambda x, y: math.gcd(x, y), [cel-x for x in arr])

people = sum((cel - elem) // nwd for elem in arr)

print('{} {}'.format(people, nwd))


import os

from math import gcd
from functools import reduce


def f(arr):
    max_a = max(arr)
    diffs = []
    for a in arr:
        diffs.append(max_a - a)

    z = reduce(gcd, diffs)
    y = 0
    for diff in diffs:
        y += int(diff / z)

    return f"{y} {z}"


if os.environ.get('DEBUG', False):
    print(f"{f([3, 12, 6])} = 5 3")
    print(f"{f([2, 9])} = 1 7")
    print(f"{f([2, 1000000000, 4, 6, 8, 4, 2])} = 2999999987 2")
    print(f"{f([13, 52, 0, 13, 26, 52])} = 12 13")
else:
    input()
    arr = list(map(int, input().split()))
    print(f(arr))


import sys

def hcf(a,b):
	while a:
		temp=a
		a=b%a
		b=temp
	return b


n=int(sys.stdin.readline())

a=[int(i) for i in sys.stdin.readline().split()]

val=max(a)

m=val-a[0]

tmp_sum=0

for x in range(n):
	m=hcf(val-a[x],m)
	tmp_sum+=val-a[x]

print(tmp_sum//m,m)	


def gcd(a, b):
    """a, bの最大公約数(greatest common divisor:GCD)を求める"""
    if b == 0:
        return a
    return gcd(b, a%b)


def lcm(a, b):
    """a, bの最小公倍数(least common multiple:LCM)を求める"""
    return (a * b) // gcd(a, b)


def multi_gcd(array: list) -> int:
    """arrayのGCDを求める"""
    ans = array[0]
    for i in range(1, len(array)):
        ans = gcd(ans, array[i])
    return ans


def multi_lcm(array):
    """arrayのLCMを求める"""
    ans = array[0]
    for i in range(1, len(array)):
        ans = (ans * array[i]) // gcd(ans, array[i])
    return ans


n = int(input())
a = list(map(int, input().split()))
a = sorted(a)
li_a = []
for i in range(n-1):
    tmp = a[i+1] - a[i]
    if tmp != 0:
        li_a.append(tmp)
gcd_a = multi_gcd(li_a)
max_a = max(a)
ans = 0
for i in range(n):
    ans += (max_a - a[i]) // gcd_a
print(ans, gcd_a)




n = int(input())
a = list(map(int, input().split()))
a = sorted(a)
b = [0] * (n - 1)
for i in range(n - 1):
    b[i] = a[i + 1] - a[i]
nd = b[0]
def nod(a, b):
    if b == 0:
        return a
    else:
        return nod(b, a % b)

for i in range(1, n - 1):
    nd = nod(nd, b[i])
    #print(nd)
ans = 0
for i in range(n):
    ans += (a[-1] - a[i]) // nd
print(ans, nd)
#print(a, b)


import math
from functools import reduce
def find_gcd(list):
    x = reduce(math.gcd, list)
    return x
def ain():
    return list(map( int, input().split() ))
# for _ in range(int(input()))
# n = int(input())
# a = list(map(int, input().split()))

n = int(input())
l = list(ain())
maxv = max(l)
s = []
for x in l:
    if x != maxv:
        s += [maxv-x]

z = (find_gcd(s))
y = 0
for x in s:
    y += (x//z)
print(str(y) + ' ' + str(z))


    
   


    

        



# python3 p.py


import math
n=int(input())
arr=list(map(int,input().strip().split()))
x=max(arr)
a=[]
xx=x-arr[0]
for i in arr:
    ai=x-i
    a.append(ai)
    xx=math.gcd(xx,ai)
# print(a,xx)
print(sum(a)//xx,xx)

n=int(input())
a=list(map(int,input().split()))

M=max(a)

def gcd(a,b):
    if a<b: a,b=b,a
    while b!=0:
        a,b=b,a%b
    return a

r=M-a[0]

for i in range(1,n):
    r=gcd(r,M-a[i])


ans=0

for i in a:
    ans+=(M-i)//r

print(ans,r)