#include <bits/stdc++.h>
using namespace std;
long long n;
int main() {
  cin >> n;
  long long ans = (long long)100000 * 1000000;
  for (long long p = 1; p <= sqrt(n) + 1; ++p) {
    if (n % p == 0)
      n /= p;
    else
      continue;
    for (long long i = sqrt(n); i >= 1; --i) {
      if (n % i == 0) {
        ans = min(ans, (p + 1) * (i + 2) * (n / i + 2) - n * p);
        break;
      }
    }
    n *= p;
  }
  cout << ans << " " << (n + 1) * 3 * 3 - n << endl;
  return 0;
}
