import java.lang.reflect.Array;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Scanner;
public class Main {
static private ArrayList<Integer> Array0 = new ArrayList<Integer>();
static private ArrayList<Integer> Array1 = new ArrayList<Integer>();
static private ArrayList<Integer> Array2 = new ArrayList<Integer>();
static private int gcd(int a,int b)
{
return (b==0)?a:gcd(b,a%b);
}
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner in = new Scanner(System.in);
int n;
n = in.nextInt();
boolean flag = false;
for(int i=0;i<n;i++)
{
int x = in.nextInt();
Array0.add(x);
}
Array1.add(0);
Array2.add(0);
for(int i=1;i<Array0.size();i++)
{
Array1.add(i, Array0.get(0)*Array0.get(i));
Array2.add(i,2*Math.abs(Array0.get(i)-Array0.get(0)));
int t = gcd(Array1.get(i),Array2.get(i));
Array1.set(i,Array1.get(i)/t);
Array2.set(i,Array2.get(i)/t);
}
int resb=0;
for(int i=1;i<n;i++)
{
resb = gcd(resb,Array2.get(i));
}
BigInteger resa = new BigInteger(""+Array1.get(1));
for(int i=1;i<n;i++)
{
BigInteger x = new BigInteger(""+Array1.get(i));
resa = resa.multiply(x.divide(x.gcd(resa)));
}
BigInteger resbb = new BigInteger(""+resb);
resa = resa.divide(resa.gcd(resbb));
resbb = resbb.divide(resbb.gcd(resa));
System.out.println(resa+" "+resbb);
}
}