from math import gcd class Fraction: def __init__(self, top, bottom): self.top = top self.bottom = bottom def compare(L, R): if type(L) == int: L = Fraction(L, 1) if type(R) == int: R = Fraction(R, 1) a = L.top*R.bottom b = L.bottom*R.top if a < b: return -1 elif a == b: return 0 else: return 1 def max_f(L, R): if type(L) == int: L = Fraction(L, 1) if type(R) == int: R = Fraction(R, 1) a = L.top*R.bottom b = L.bottom*R.top if a < b: return R else: return L def min_f(L, R): if type(L) == int: L = Fraction(L, 1) if type(R) == int: R = Fraction(R, 1) a = L.top*R.bottom b = L.bottom*R.top if a < b: return L else: return R N = int(input()) A = sorted(list(map(int, input().split()))) MAX = Fraction(1, 10**9*3) for i in reversed(range(N-1)): if compare(Fraction(A[i], A[i+1]), MAX) == 1: MAX = Fraction(A[i], A[i+1]) top = MAX.top bottom = MAX.bottom GCD = gcd(top, bottom) top //= GCD bottom //= GCD print(top, bottom)