#include using namespace std; #define rep(i,a,b) for(int i=a;i enumdiv(ll n) { map V; if (n == 1) V[1] = 1; else { for (ll i = 2; i*i <= n; i++) while (n%i == 0) V[i]++, n /= i; if (n>1) V[n]++; } return V; } ll N; int main() { cin.tie(0); ios::sync_with_stdio(false); while (cin >> N) { auto ps = enumdiv(N); vector primes; for (auto p : ps) rep(i, 0, p.second) primes.push_back(p.first); if (primes.size() == 1) { cout << (N - 1) << " " << (N - 1) << endl; continue; } if (primes.size() == 2) { cout << (primes[0] + primes[1] - 2) << " " << (N - 1) << endl; continue; } if (primes.size() == 3) { cout << (primes[0] + primes[1] + primes[2] - 3) << " " << (N - 1) << endl; continue; } rep(i, 0, primes.size() - 3) { sort(primes.begin() + i, primes.end()); primes[i + 1] *= primes[i]; } ll ans = 0; rep(i, primes.size() - 3, primes.size()) ans += primes[i] - 1; cout << ans << " " << (N - 1) << endl; } }