#include #include using namespace std; int main() { long long n, N = 0, Tmin = 0, Tmax, ctr1 = 0, ctr2 = 0; cin >> n; Tmax = n - 1; if (n % 2 == 0) { while (n != 1) { N = n / 2; n = N; Tmin++; if (n == 1)break; if (n % 2 != 0) { Tmin += n - 1; ctr1 = 1; break; } } if(ctr1==1)cout << Tmin << " " << Tmax << endl; else cout << Tmin + 1 << " " << Tmax << endl; } else { if (n < 5000) { for (int i = 3; i < 5000; i+=2) { if (pow(i, 3) == n) { cout << (i - 1) * 3 << " " << Tmax; ctr2 = 1; break; } } } else if (n >= 5000) { for (int i = 5001; i <= 10000; i += 2) { if (pow(i, 3) == n) { cout << (i - 1) * 3 << " " << Tmax; ctr2 = 1; break; } } } if(ctr2==0) cout << Tmax << " " << Tmax << endl; } return 0; }