#include #define int long long using namespace std; int Sq(int n) { int i = 1; while (i * i <= n) { i++; } return i - 1; } signed main() { int n; cin >> n; int ansMin = 0; int ansMax = n - 1; int maxI = Sq(n); for (int i = maxI; i >= 1; i--) { if (n % i == 0) { n /= i; ansMin += i - 1; } } for (int i = maxI; i >= 1; i--) { if (n % i == 0) { n /= i; ansMin += i - 1; } } ansMin += n - 1; cout << ansMin << " " << ansMax << endl; return 0; }