#include <bits/stdc++.h>
using namespace std;
long long n, second, t, i, j, rez, mini, maxi;
long long inf = 1000000000000000000ll;
int main() {
  cin >> n;
  mini = inf;
  maxi = -inf;
  for (i = 1; i * i <= n; i++)
    if (n % i == 0) {
      second = n / i;
      for (j = i; j * j <= second; j++)
        if (second % j == 0) {
          t = second / j;
          if (t < j) break;
          rez = (i + 1) * (j + 2) * (t + 2) - n;
          if (rez >= 0) {
            if (rez < mini) mini = rez;
            if (rez > maxi) maxi = rez;
          }
          rez = (j + 1) * (i + 2) * (t + 2) - n;
          if (rez >= 0) {
            if (rez < mini) mini = rez;
            if (rez > maxi) maxi = rez;
          }
          rez = (t + 1) * (j + 2) * (i + 2) - n;
          if (rez >= 0) {
            if (rez < mini) mini = rez;
            if (rez > maxi) maxi = rez;
          }
        }
      if (j * j <= second) break;
    }
  cout << mini << " " << maxi;
  return 0;
}
