#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:16777216")
using namespace std;
int main() {
  int n;
  cin >> n;
  unsigned long long mx, mn;
  mx = mn = 0;
  for (unsigned long long i = 1; i * i * i <= n; i++)
    for (unsigned long long j = 1; j * j <= n / i; j++) {
      unsigned long long k1 = n;
      if (k1 % i) continue;
      k1 /= i;
      if (k1 % j) continue;
      k1 /= j;
      unsigned long long ar[3] = {i, j, k1};
      sort(ar, ar + 3);
      do {
        unsigned long long res = (ar[0] + 1) * (ar[1] + 2) * (ar[2] + 2) - n;
        if (mx == 0 || mx < res) mx = res;
        if (mn == 0 || mn > res) mn = res;
      } while (next_permutation(ar, ar + 3));
    }
  cout << mn << " " << mx;
  return 0;
}
