#include <bits/stdc++.h>
using namespace std;
const int INF = (int)1e9;
const long long LINF = (long long)INF * INF;
int main() {
  ios_base::sync_with_stdio(false);
  long long n;
  cin >> n;
  long long mR = (n + 1) * 9LL;
  long long d = 2;
  long long q[3];
  int idx[3];
  long long limit = (long long)(sqrt(n + .0 + 1e-9));
  long long mr = LINF;
  for (d = limit; d >= 1; --d) {
    if (n % d == 0) {
      for (int i = 0; i < 3; ++i) idx[i] = i;
      q[0] = d, q[1] = n / d, q[2] = 1;
      do {
        mr = min(mr, (q[idx[0]] + 1) * (q[idx[1]] + 2) * (q[idx[2]] + 2));
        mR = max(mR, (q[idx[0]] + 1) * (q[idx[1]] + 2) * (q[idx[2]] + 2));
      } while (next_permutation(idx, idx + 3));
    }
  }
  for (long long d1 = 1; d1 <= 40000; ++d1) {
    for (long long d2 = 1; d2 <= 1000; ++d2) {
      if (n % (d1 * d2) == 0) {
        for (int i = 0; i < 3; ++i) idx[i] = i;
        q[0] = d1, q[1] = n / (d1 * d2), q[2] = d2;
        do {
          mr = min(mr, (q[idx[0]] + 1) * (q[idx[1]] + 2) * (q[idx[2]] + 2));
          mR = max(mR, (q[idx[0]] + 1) * (q[idx[1]] + 2) * (q[idx[2]] + 2));
        } while (next_permutation(idx, idx + 3));
      }
    }
  }
  mr -= n;
  mR -= n;
  cout << mr;
  cout << ' ';
  cout << mR;
  return 0;
}
