import sys import math from functools import cmp_to_key def main(): input = sys.stdin.readline # Use fast input n = int(input()) a = list(map(int, input().split())) a.sort() b = [(a[i], a[i+1]) for i in range(n - 1)] def c(x, y): x0, x1 = x y0, y1 = y if x0 * y1 > x1 * y0: return 1 elif x0 * y1 < x1 * y0: return -1 else: return 0 b.sort(key=cmp_to_key(c)) g = math.gcd(b[-1][0], b[-1][1]) sys.stdout.write(f"{b[-1][0] // g} {b[-1][1] // g}\n") if __name__ == '__main__': main()