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.
[{"code": "import sys\ninput = sys.stdin.readline\n\nn = int(input())\na = list(map(int,input().split()))\n\ndef gcd(a, b):  \n    while b:\n        a, b = b, a%b\n    return a\n\ndef gcdL(l):\n    while len(l) != 1:\n        a = l.pop()\n        b = l.pop()\n        l.append(gcd(a,b))\n    return l[0]\n\nM = max(a)\nl2 = [M - i for i in a if i != M]\ntot = sum(l2)\nsmall = gcdL(l2)\n\nprint(tot//small, small)\n\n", "passed": true, "time": 0.2, "memory": 14144.0, "status": "done"}, {"code": "n=int(input())\nli=list(map(int,input().split()))\nb=max(li)\nc=[]\nn1=0\nfor i in li:\n    if i!=b:\n        c.append(b-i)\n        n1+=1\nimport math\nif n1==0:\n    print(0,0)\nelse:\n    a1=c[0]\n    for i in c:\n        a1=math.gcd(i,a1)\nprint(sum(c)//a1,a1)\n    \n", "passed": true, "time": 0.14, "memory": 14176.0, "status": "done"}, {"code": "def gcd(a,b):\n    if (a == 0): return b;\n    else: return gcd(b % a, a); \nn=int(input())\na=input().split()\nfor i in range(n):\n    a[i]=int(a[i])\nmaxi=max(a)    \nb=gcd(maxi-a[0],maxi-a[1])\nfor j in range(2,n):\n    b=gcd(b,maxi-a[j])\nans=0\nfor i in range(n):\n    ans+=(maxi-a[i])//b\nprint(ans,b)    ", "passed": true, "time": 0.15, "memory": 14268.0, "status": "done"}, {"code": "def nod(a, b):\n    if a > b:\n        return nod(b, a)\n    elif a == 0:\n        return b\n    else:\n        return nod(b % a, a)\n\n\nn = int(input())\ns = list(map(int, input().split()))\nm = max(s)\nc = list(filter(lambda x: x>0,map(lambda x: m - x, s)))\nd = 0\nfor j in c:\n    d = nod(d,j)\nans = 0\nfor j in c:\n    ans+=j//d\nprint(ans,d)", "passed": true, "time": 0.15, "memory": 14344.0, "status": "done"}, {"code": "'''input\n6\n13 52 0 13 26 52\n'''\nfrom sys import stdin\nimport math\n\n\n# main starts\nn = int(stdin.readline().strip())\narr = list(map(int, stdin.readline().split()))\naux = []\nmx = max(arr)\nfor i in arr:\n\taux.append(mx - i)\n\ng = aux[0]\nfor i in range(1,len(aux)):\n\tg = math.gcd(g, aux[i])\n\np = 0\nfor i in aux:\n\tp += i // g\nprint(p, g)", "passed": true, "time": 0.14, "memory": 14176.0, "status": "done"}, {"code": "from math import gcd\nn=int(input())\na=list(map(int,input().split()))\nd=max(a)\ns=0\nk=0\nfor i in range(n):\n    s+=d-a[i]\n    k=gcd(k,d-a[i])\nprint(s//k,k)", "passed": true, "time": 0.18, "memory": 14116.0, "status": "done"}, {"code": "import math\nn = int(input())\na = list(map(int,input().split()))\nl = max(a)\nc = []\nfor i in range(len(a)):\n    c.append(l-a[i])\np = 0\nfor i in range(len(c)):\n    p = math.gcd(p,c[i])\no = sum(c)\nprint(o//p,p)\n", "passed": true, "time": 0.17, "memory": 14248.0, "status": "done"}, {"code": "from math import gcd\nn = int(input())\na = sorted(list(map(int,input().split())))\ns = sum(a)-a[n-1]\nt = a[n-1]*(n-1)\nans = t-s\ng = a[n-1]-a[0]\nfor i in range(1,n-1):\n    g = gcd(a[n-1]-a[i],g)\nprint(ans//g,g)\n", "passed": true, "time": 0.23, "memory": 14332.0, "status": "done"}, {"code": "from math import gcd\nn=int(input())\na=[int(x) for x in input().split()]\nboss=max(a)\narr=0\ng=0\nfor i in range(n):\n    a[i]=boss-a[i]\n    g=gcd(g,a[i])\nfor item in a:\n    arr+=item//g\nprint(arr,g)\n    \n", "passed": true, "time": 0.14, "memory": 14272.0, "status": "done"}, {"code": "from functools import reduce\ndef gcd(a,b):\n\tif not b:\n\t\treturn a\n\treturn gcd(b,a%b)\n\nn=int(input())\narr=[int(x) for x in input().split(' ')]\nmx=max(arr)\narr=[mx-x for x in arr if mx-x]\nGCD=reduce(gcd,arr)\nprint(sum(arr)//GCD,GCD)", "passed": true, "time": 0.15, "memory": 14092.0, "status": "done"}, {"code": "def gcd(a, b): \n    if(b == 0): \n        return a \n    else: \n        return gcd(b, a % b) \n\nn = int(input())\na = list(map(int, input().split()))\n\nmaxa = max(a)\n\nr = [maxa - x for x in a]\n\nz = r[0]\nfor i in range(1, n):\n    z = gcd(z, r[i])\n\ny = sum(r) // z\nprint(y, z)\n", "passed": true, "time": 0.14, "memory": 14268.0, "status": "done"}, {"code": "from math import gcd\nn=int(input())\na=list(map(int,input().split()))\nma=max(a)\ny=0\nz=0\nfor i in a:\n    z=gcd(z,ma-i)\nfor i in a:\n    y+=(ma-i)//z\nprint(y,z)\n    \n", "passed": true, "time": 0.15, "memory": 14124.0, "status": "done"}, {"code": "def gcd(a,b):\n    if b==0: return a \n    return gcd(b,a%b)\nn=int(input())\nl=[int(i) for i in input().split()]\n#x total \n#y*z taken \nm=max(l)\nd=[m-i for i in l]\ng=0 \nsm=sum(d)\nfor i in d:\n    g=gcd(i,g)\nprint(sm//g,g)", "passed": true, "time": 1.81, "memory": 14128.0, "status": "done"}, {"code": "import sys\ninput = sys.stdin.readline\nn=int(input())\nA=list(map(int,input().split()))\n\nx=max(A)\n\nfrom math import gcd\n\nz=0\nSUM=0\nfor a in A:\n    z=gcd(z,x-a)\n    SUM+=x-a\n\ny=SUM//z\n\nprint(y,z)\n", "passed": true, "time": 0.24, "memory": 14280.0, "status": "done"}, {"code": "from math import gcd\nfrom functools import reduce\n\n\ndef gcd_list(a):\n    ans = reduce(gcd, a)\n    return ans\n\n\nn = int(input())\na = list(map(int, input().split()))\nmn = min(a)\na = [el - mn for el in a]\nz = gcd_list(a)\nmx = max(a)\ny = 0\nfor el in a:\n    y += (mx - el) // z\nprint(y, z)\n", "passed": true, "time": 0.18, "memory": 14172.0, "status": "done"}, {"code": "import math\nfrom functools import reduce\n\nl = int(input())\n\narr = list([int(x) for x in input().split(' ')])\n\ncel = max(arr)\nnwd = reduce(lambda x, y: math.gcd(x, y), [cel-x for x in arr])\n\npeople = sum((cel - elem) // nwd for elem in arr)\n\nprint('{} {}'.format(people, nwd))\n", "passed": true, "time": 0.14, "memory": 14236.0, "status": "done"}, {"code": "import os\n\nfrom math import gcd\nfrom functools import reduce\n\n\ndef f(arr):\n    max_a = max(arr)\n    diffs = []\n    for a in arr:\n        diffs.append(max_a - a)\n\n    z = reduce(gcd, diffs)\n    y = 0\n    for diff in diffs:\n        y += int(diff / z)\n\n    return f\"{y} {z}\"\n\n\nif os.environ.get('DEBUG', False):\n    print(f\"{f([3, 12, 6])} = 5 3\")\n    print(f\"{f([2, 9])} = 1 7\")\n    print(f\"{f([2, 1000000000, 4, 6, 8, 4, 2])} = 2999999987 2\")\n    print(f\"{f([13, 52, 0, 13, 26, 52])} = 12 13\")\nelse:\n    input()\n    arr = list(map(int, input().split()))\n    print(f(arr))\n", "passed": true, "time": 0.14, "memory": 14116.0, "status": "done"}, {"code": "import sys\n\ndef hcf(a,b):\n\twhile a:\n\t\ttemp=a\n\t\ta=b%a\n\t\tb=temp\n\treturn b\n\n\nn=int(sys.stdin.readline())\n\na=[int(i) for i in sys.stdin.readline().split()]\n\nval=max(a)\n\nm=val-a[0]\n\ntmp_sum=0\n\nfor x in range(n):\n\tm=hcf(val-a[x],m)\n\ttmp_sum+=val-a[x]\n\nprint(tmp_sum//m,m)\t\n", "passed": true, "time": 0.14, "memory": 14120.0, "status": "done"}, {"code": "def gcd(a, b):\n    \"\"\"a, b\u306e\u6700\u5927\u516c\u7d04\u6570(greatest common divisor:GCD)\u3092\u6c42\u3081\u308b\"\"\"\n    if b == 0:\n        return a\n    return gcd(b, a%b)\n\n\ndef lcm(a, b):\n    \"\"\"a, b\u306e\u6700\u5c0f\u516c\u500d\u6570(least common multiple:LCM)\u3092\u6c42\u3081\u308b\"\"\"\n    return (a * b) // gcd(a, b)\n\n\ndef multi_gcd(array: list) -> int:\n    \"\"\"array\u306eGCD\u3092\u6c42\u3081\u308b\"\"\"\n    ans = array[0]\n    for i in range(1, len(array)):\n        ans = gcd(ans, array[i])\n    return ans\n\n\ndef multi_lcm(array):\n    \"\"\"array\u306eLCM\u3092\u6c42\u3081\u308b\"\"\"\n    ans = array[0]\n    for i in range(1, len(array)):\n        ans = (ans * array[i]) // gcd(ans, array[i])\n    return ans\n\n\nn = int(input())\na = list(map(int, input().split()))\na = sorted(a)\nli_a = []\nfor i in range(n-1):\n    tmp = a[i+1] - a[i]\n    if tmp != 0:\n        li_a.append(tmp)\ngcd_a = multi_gcd(li_a)\nmax_a = max(a)\nans = 0\nfor i in range(n):\n    ans += (max_a - a[i]) // gcd_a\nprint(ans, gcd_a)\n\n\n", "passed": true, "time": 0.14, "memory": 14384.0, "status": "done"}, {"code": "n = int(input())\na = list(map(int, input().split()))\na = sorted(a)\nb = [0] * (n - 1)\nfor i in range(n - 1):\n    b[i] = a[i + 1] - a[i]\nnd = b[0]\ndef nod(a, b):\n    if b == 0:\n        return a\n    else:\n        return nod(b, a % b)\n\nfor i in range(1, n - 1):\n    nd = nod(nd, b[i])\n    #print(nd)\nans = 0\nfor i in range(n):\n    ans += (a[-1] - a[i]) // nd\nprint(ans, nd)\n#print(a, b)\n", "passed": true, "time": 0.14, "memory": 14300.0, "status": "done"}, {"code": "import math\nfrom functools import reduce\ndef find_gcd(list):\n    x = reduce(math.gcd, list)\n    return x\ndef ain():\n    return list(map( int, input().split() ))\n# for _ in range(int(input()))\n# n = int(input())\n# a = list(map(int, input().split()))\n\nn = int(input())\nl = list(ain())\nmaxv = max(l)\ns = []\nfor x in l:\n    if x != maxv:\n        s += [maxv-x]\n\nz = (find_gcd(s))\ny = 0\nfor x in s:\n    y += (x//z)\nprint(str(y) + ' ' + str(z))\n\n\n    \n   \n\n\n    \n\n        \n\n\n\n# python3 p.py\n", "passed": true, "time": 0.16, "memory": 14320.0, "status": "done"}, {"code": "import math\nn=int(input())\narr=list(map(int,input().strip().split()))\nx=max(arr)\na=[]\nxx=x-arr[0]\nfor i in arr:\n    ai=x-i\n    a.append(ai)\n    xx=math.gcd(xx,ai)\n# print(a,xx)\nprint(sum(a)//xx,xx)", "passed": true, "time": 0.14, "memory": 14248.0, "status": "done"}, {"code": "n=int(input())\na=list(map(int,input().split()))\n\nM=max(a)\n\ndef gcd(a,b):\n    if a<b: a,b=b,a\n    while b!=0:\n        a,b=b,a%b\n    return a\n\nr=M-a[0]\n\nfor i in range(1,n):\n    r=gcd(r,M-a[i])\n\n\nans=0\n\nfor i in a:\n    ans+=(M-i)//r\n\nprint(ans,r)\n", "passed": true, "time": 0.14, "memory": 14136.0, "status": "done"}]