#include <bits/stdc++.h>
using namespace std;
long long mi, mx, n, ta, tb, tc;
void C(long long x, long long y, long long z) {
  ta = (x + 1) * (y + 2) * (z + 2);
  if (ta > mx) mx = ta;
  if (ta < mi) mi = ta;
}
int main() {
  long long a, b, c, d, uu;
  uu = 1000000;
  scanf("%I64d", &n);
  int k = (int)sqrt(double(n));
  mx = -999;
  mi = uu * uu * uu;
  for (int i = 1; i <= k; i++) {
    if (n % i == 0) {
      a = i;
      b = n / i;
      int kk = (int)sqrt(double(b));
      for (int j = 1; j <= kk; j++)
        if (b % j == 0) {
          c = b / j;
          d = j;
          C(a, c, d);
          C(c, a, d);
          C(d, a, c);
        }
    }
  }
  printf("%I64d %I64d\n", mi - n, mx - n);
  return 0;
}
