#include using namespace std; using ll = long long; #define rep(i, s, e) for (int i = (int)s; i < (int)e; ++i) #define all(a) (a).begin(),(a).end() vector enum_divisors(ll n) { vector res; for (ll i = 1; i * i <= n; i++) { if (n % i == 0) { res.push_back(i); if (n / i != i) res.push_back(n / i); } } sort(res.begin(), res.end()); return res; } int main() { cin.tie(nullptr); ll M; cin >> M; if (M == 1) { cout << "1 1\n"; return 0; } vector divs = enum_divisors(M); cout << divs[1] << ' ' << divs[divs.size() - 2] << '\n'; }