import math N=int(input()) A=list(map(int,input().split())) A.sort() gcd=math.gcd(A[-1],A[-2]) print(A[-2]//gcd,A[-1]//gcd)