#include <bits/stdc++.h> using namespace std; int main(){ ios_base::sync_with_stdio(false); cin.tie(nullptr); int N; cin >> N; vector<int> A(N); for (int i = 0; i < N; i++){ cin >> A[i]; A[i]--; } sort(A.begin(), A.end()); long long x = A[0], y = A[1]; for (int i = 1; i < N - 1; i++){ if (A[i] * y <= A[i + 1] * x){ x = A[i]; y = A[i + 1]; } } int g = gcd(x, y); cout << x / g << ' ' << y / g << endl; }