#include <bits/stdc++.h>
using namespace std;
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  std::cerr << name << " : " << arg1 << endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  std::cerr.write(names, comma - names) << " : " << arg1 << " | ";
  __f(comma + 1, args...);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int T = 1;
  while (T--) {
    long long int n;
    cin >> n;
    long long int ans1 = 1000000000000000000;
    std::vector<long long int> factors;
    for (long long int i = 1; i <= sqrt(n); i++) {
      if (n % i == 0) {
        factors.push_back(i);
        factors.push_back(n / i);
      }
    }
    for (long long int i = 0; i < factors.size(); i++) {
      for (long long int j = 0; j < factors.size(); j++) {
        if (n % (factors[i] * factors[j]) == 0) {
          long long int a, b, c;
          a = n / (factors[i] * factors[j]);
          b = factors[i];
          c = factors[j];
          long long int tmp = ((a + 1) * (b + 2) * (c + 2)) - n;
          ans1 = min(ans1, tmp);
        }
      }
    }
    long long int ans2 = 8 * n + 9;
    cout << ans1 << " " << ans2;
  }
  return 0;
}
