#include <bits/stdc++.h>
using namespace std;
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  cerr << name << " : " << arg1 << std::endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  cerr.write(names, comma - names) << " : " << arg1 << " | ";
  __f(comma + 1, args...);
}
int main() {
  long long int n;
  scanf("%lld", &n);
  long long int mx = (n + 1LL) * 3LL * 3LL - n;
  long long int mn = -1;
  for (long long int i = 1; i * i <= n; i++) {
    if (n % i == 0) {
      for (long long int j = 1; j * j <= n / i; j++) {
        if ((n / i) % j == 0) {
          long long int A = i + 1LL;
          long long int B = j + 2LL;
          long long int C = n / (i * j) + 2LL;
          long long int val = A * B * C - n;
          if (mn == -1)
            mn = val;
          else
            mn = min(mn, val);
        }
      }
    }
  }
  printf("%lld %lld\n", mn, mx);
  return 0;
}
