#include #include #include #include #include #include using namespace std; using namespace atcoder; using ll = long long; using mint = modint998244353; using vi = vector; using vvi = vector; using vvvi = vector; using vll = vector; using vvll = vector; using vvvll = vector; using vmi = vector; using vvmi = vector; using vvvmi = vector; #define all(a) (a).begin(), (a).end() #define rep2(i, m, n) for (int i = (m); i < (n); ++i) #define rep(i, n) rep2(i, 0, n) #define drep2(i, m, n) for (int i = (m)-1; i >= (n); --i) #define drep(i, n) drep2(i, n, 0) vll a; using p = pair; int gcd(int x, int y){ if(x == 0){ return y; }else{ return gcd(y%x, x); } } int main(){ ios::sync_with_stdio(false); std::cin.tie(nullptr); int n; cin >> n; rep(i, n){ ll b; cin >> b; a.push_back(b); } sort(all(a)); auto cmp = [](const p s, const p t){ return s.first * t.second < s.second *t.first; }; priority_queue, decltype(cmp)> pq; rep(i, n-1)pq.push({a[i], a[i+1]}); ll x = pq.top().first, y = pq.top().second; int g = gcd((int)x, (int)y); cout << x/g << " " << y/g << endl; return 0; }