from functools import cmp_to_key def cmp(a, b): x, y = a xx, yy = b s = x * yy - y * xx return 1 if s > 0 else -1 if s < 0 else 0 def gcd(a, b): while b: a, b = b, a % b return a N = int(input()) A = list(map(int, input().split())) A.sort() B = [(A[i - 1], A[i]) for i in range(1, N)] B.sort(key = cmp_to_key(cmp)) a, b = B[-1] g = gcd(a, b) print(a // g, b // g)