from math import gcd class Fraction: def __init__(self, x, y): g = gcd(x, y) self.x = x // g self.y = y // g def __lt__(self, other): return self.x * other.y < other.x * self.y def __le__(self, other): return self.x * other.y <= other.x * self.y def __gt__(self, other): return self.x * other.y > other.x * self.y def __ge__(self, other): return self.x * other.y >= other.x * self.y def __eq__(self, other): return self.x * other.y == other.x * self.y N = int(input()) A = list(map(int, input().split())) A.sort() ans = Fraction(0, 1) for i in range(N - 1): ans = max(Fraction(A[i], A[i + 1]), ans) print(ans.x, ans.y)