#include using namespace std; using ll = long long; int main() { cin.tie(nullptr); ios_base::sync_with_stdio(false); int n; cin >> n; vector a(n); for (int i = 0; i < n; i++) cin >> a[i]; sort(a.begin(), a.end()); ll x = 0, y = 1; for (int i = 0; i + 1 < n; i++) { if (a[i] * y > a[i + 1] * x) { x = a[i]; y = a[i + 1]; } } cout << x / gcd(x, y) << " " << y / gcd(x, y) << "\n"; return 0; }