Problem: 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 ≤ n ≤ 2 ⋅ 10^{5}) — the number of types of swords.

The second line of the input contains the sequence a_1, a_2, ..., a_n (0 ≤ a_i ≤ 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 ≠ 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.

Solution (in JAVA):

Solution:

import java.io.*;
import java.util.*;

public class ss {

	static int V;
	static int n;
	static Edge[] edgeList;
	static String q = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";

	static double kruskal() // O(E log E)
	{
		double mst = 0.0;
		Arrays.sort(edgeList);
		UnionFind uf = new UnionFind(n);

		for (Edge e : edgeList)
			if (uf.union(e.u, e.v))
				System.out.println(q.charAt(e.u) + "-" + q.charAt(e.v) + " " + (int) e.w);
		return mst;
	}

	static class Edge implements Comparable<Edge> {
		int u, v;
		int w;

		Edge(int a, int b, int c) {
			u = a;
			v = b;
			w = c;
		}

		public int compareTo(Edge e) {
			return w > e.w ? -1 : w == e.w ? 0 : 1;
		}

		@Override
		public String toString() {
			// TODO Auto-generated method stub
			return w + "";
		}
	}

	static class UnionFind {
		int[] p, rank;

		UnionFind(int N) {
			p = new int[N];
			rank = new int[N];
			for (int i = 0; i < N; i++)
				p[i] = i;
		}

		int findSet(int x) {
			return p[x] == x ? x : (p[x] = findSet(p[x]));
		}

		boolean isuni(int x, int y) {
			return findSet(x) == findSet(y);
		}

		boolean union(int x, int y) {
			x = findSet(x);
			y = findSet(y);
			if (x == y)
				return false;

			if (rank[x] > rank[y])
				p[y] = x;
			else {
				p[x] = y;
				if (rank[x] == rank[y])
					++rank[y];
			}
			return true;
		}
	}

	static ArrayList<Integer>[] adjList;
	static boolean[] visited;

	/*
	 * static void dfs(int u) //O(V + E) adjList, O(V^2) adjMat { visited[u] = 1;
	 * 
	 * //for adjacency list for(int v: adjList[u]) if(visited[v]==0) dfs(v);
	 * 
	 * }
	 */
	/*
	 * 2.Breadth-First Search (BFS)
	 */
	static int bfs(int s) {
		int w = 0;
		Queue<Integer> q = new LinkedList<Integer>();
		q.add(s);
		visited[s] = true;
		while (!q.isEmpty()) {
			int n = q.size();
			w++;
			for (int i = 0; i < n; i++) {
				int u = q.remove();
				for (int v : adjList[u])
					if (!visited[v]) {
						visited[v] = true;
						q.add(v);
					}
			}

		}
		return w;

	}

	static class pair implements Comparable<pair> {
		int x;
		int y;

		pair(int a, int s) {
			x = a;
			y = s;

		}

		@Override
		public int compareTo(pair o) {
			return o.x - x;
		}
	}

	public static double dis(pair q, pair w) {
		return Math.sqrt((q.x - w.x) * (q.x - w.x) + (q.y - w.y) * (q.y - w.y));
	}

	static int k;

	static class SegmentTree { // 1-based DS, OOP

		int N; // the number of elements in the array as a power of 2 (i.e. after padding)
		int[] array, sTree, lazy;

		SegmentTree(int[] in) {
			array = in;
			N = in.length - 1;
			sTree = new int[N << 1]; // no. of nodes = 2*N - 1, we add one to cross out index zero
			lazy = new int[N << 1];
			build(1, 1, N);
		}

		void build(int node, int b, int e) // O(n)
		{
			if (b == e) {
				sTree[node] = array[b] >= k ? 1 : 0;
			} else {
				int mid = b + e >> 1;
				build(node << 1, b, mid);
				build(node << 1 | 1, mid + 1, e);
				sTree[node] = sTree[node << 1] + sTree[node << 1 | 1];
			}
		}

		void update_point(int index, int val) // O(log n)
		{
			index += N - 1;
			sTree[index] += val;
			while (index > 1) {
				index >>= 1;
				sTree[index] = sTree[index << 1] + sTree[index << 1 | 1];
			}
		}

		void update_range(int i, int j, int val) // O(log n)
		{
			update_range(1, 1, N, i, j, val);
		}

		void update_range(int node, int b, int e, int i, int j, int val) {
			if (i > e || j < b)
				return;
			if (b >= i && e <= j) {
				sTree[node] += (e - b + 1) * val;
				lazy[node] += val;
			} else {
				int mid = b + e >> 1;
				propagate(node, b, mid, e);
				update_range(node << 1, b, mid, i, j, val);
				update_range(node << 1 | 1, mid + 1, e, i, j, val);
				sTree[node] = sTree[node << 1] + sTree[node << 1 | 1];
			}

		}

		void propagate(int node, int b, int mid, int e) {
			lazy[node << 1] += lazy[node];
			lazy[node << 1 | 1] += lazy[node];
			sTree[node << 1] += (mid - b + 1) * lazy[node];
			sTree[node << 1 | 1] += (e - mid) * lazy[node];
			lazy[node] = 0;
		}

		int query(int i, int j) {
			return query(1, 1, N, i, j) >= (j - i + 1) / 2 + 1 ? 1 : (int) -1e9;
		}

		int query(int node, int b, int e, int i, int j) // O(log n)
		{
			if (i > e || j < b)
				return 0;
			if (b >= i && e <= j)
				return sTree[node];
			int mid = b + e >> 1;
			// propagate(node, b, mid, e);
			int q1 = query(node << 1, b, mid, i, j);
			int q2 = query(node << 1 | 1, mid + 1, e, i, j);
			return q1 + q2;

		}
	}

	static ArrayList<Integer> bin;
	static ArrayList<Integer> node;

	// static void dfs(int idx, int s, int e) {
	// bin.add(s);
	// node.add(idx);
	// if (e != -1) {
	// bin.add(e);
	// node.add(idx);
	// }
	// for (int i = a[idx].size() - 1; i >= 0; i--) {
	// if (!vis[i]) {
	// if (i == a[idx].size() - 1) {
	// int b = a[idx].get(i).w + 1;
	// int end = 0;
	// if (a[a[idx].get(i).v].size() == 0)
	// end = -1;
	// else
	// end = a[a[idx].get(i).v].get(0).w;
	// if(b>s)
	// dfs(a[idx].get(i).v, b, end);
	// } else {
	// int end = a[idx].get(i + 1).w;
	// int b = a[idx].get(i).w + 1;
	// if(b>s)
	// dfs(a[idx].get(i).v, b, end);
	// }
	// }
	// }
	// }

	static int[] a;
	static boolean[] vis;
	static long memo[];

	public static long dp(int idx) {
		if (idx == a.length) {
			return 0;
		}
		if (memo[idx] != -1)
			return memo[idx];
		long max = (int) -1e9;
		for (int i = idx; i < a.length; i++) {
			// System.out.println(dp(i+1)+se.query(idx+1,i+1)+" "+(i+1)+" "+(idx+1)+"
			// "+dp(i+1));
			max = Math.max(max, dp(i + 1) + se.query(idx + 1, i + 1));
		}
		return memo[idx] = max;
	}

	static SegmentTree se;

	public static void main(String[] args) throws IOException {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		PrintWriter pw = new PrintWriter(System.out);

		StringTokenizer st = new StringTokenizer(br.readLine());

		int n = Integer.parseInt(st.nextToken());

		long a[]=new long[n];
		st=new StringTokenizer(br.readLine());
		long x=1;
		long e=0;
		for (int i = 0; i < a.length; i++) {
			a[i]=Long.parseLong(st.nextToken());
			if(a[i]!=0)
			x=Math.max(a[i],x);
			e+=a[i];
		}
		int j=0;
		Long c[]=new Long[n];
		for (int i = 0; i < a.length; i++) {
			long w=x-a[i];
			c[i]=w;
		}
		Arrays.sort(c);
		long g=c[n-1];
		long sum=0;
		
		for (int i = 0; i < c.length; i++) {
			if(c[i]!=0)
				g=gcd(c[i],g);
			sum+=c[i];
		}
		if(n!=2)
			pw.print((sum/g)+" "+g);
		else 
			pw.print(1+" "+Math.abs(a[0]-a[1]));
		
		pw.flush();

	}

	 static long gcd(long a, long b) 
	    { 
	    if (a == 0) 
	        return b;  
	    return gcd(b % a, a);  
	    } 
	      
	    // method to return LCM of two numbers 
	    static long lcm(long a, long b) 
	    { 
	        return (a*b)/gcd(a, b); 
	    } 
	      
	static long modPow(long a, long e, int mod) // O(log e)
	{
		a %= mod;
		long res = 1;
		while (e > 0) {
			if ((e & 1) == 1)
				res = (res * a) % mod;
			a = (a * a) % mod;
			e >>= 1;
		}
		return res;
	}

	static long power(int x, long i) {
		if (i == 0)
			return 1;
		else if (i % 2 == 0)
			return power(x, i / 2) % ((long) (1e9) + 7) * power(x, i / 2) % ((long) (1e9) + 7);
		else
			return x * (power(x, i / 2) * 1l) % ((long) (1e9) + 7) * power(x, i / 2) % ((long) (1e9) + 7);
	}
}