import java.math.BigInteger;
import java.util.Scanner;
public class POJ_3101 {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
int t[] = new int[n];
int s[] = new int[10010];
int count = 0;
for(int i=0;i<n;i++){
int a = scan.nextInt();
if(s[a]==0){
t[count++] = a;
s[a] = 1;
}
}
java.util.Arrays.sort(t,0,count); //按 运行一圈的时间 进行排序 最后一个 即是 速度最慢的那一个
BigInteger[] tm = new BigInteger[count]; //存放分子
BigInteger[] tmp = new BigInteger[count]; //存放分母
for(int i=0;i<count-1;i++){ //固定最后一个速度 最慢的 求其它与这个的速度差
tm[i] = BigInteger.valueOf(t[count-1]*t[i]); // v = (1/t[i])-(1/t[count-1]) 速度 差
tmp[i] = BigInteger.valueOf((t[count-1]-t[i])*2); // (1/v)/2 追到一半的所用的时间
BigInteger a = tm[i].gcd(tmp[i]); // 对得到的分数进行约分 此步一定要做!!
tm[i] = tm[i].divide(a);
tmp[i] = tmp[i].divide(a);
}
count--;
BigInteger lcm = nLCM(tm,count-1); //求count个数的最小公倍数
BigInteger gcd = nGCD(tmp,count-1); //求count个数的最小公约数
System.out.println(lcm+" "+gcd);
}
public static BigInteger nGCD(BigInteger[] tmp,int n) {
if(n == 0)
return tmp[0];
return tmp[n].gcd(nGCD(tmp,n-1));
}
public static BigInteger nLCM(BigInteger[] tm,int n) {
if(n == 0)
return tm[0];
BigInteger a = nLCM(tm,n-1);
return tm[n].multiply(a).divide(tm[n].gcd(a));
}
}