import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.Arrays; public class Main { public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt(br.readLine()); String[] sa = br.readLine().split(" "); long[] a = new long[n]; for (int i = 0; i < n; i++) { a[i] = Integer.parseInt(sa[i]); } br.close(); Arrays.sort(a); long x = a[0]; long y = a[1]; for (int i = 2; i < n; i++) { long v1 = a[i - 1]; long v2 = a[i]; // x/y < v1/v2 if (x * v2 < y * v1) { x = v1; y = v2; } } long g = gcd(x, y); x /= g; y /= g; System.out.println(x + " " + y); } static long gcd(long a, long b) { return b == 0 ? a : gcd(b, a % b); } }