#include <bits/stdc++.h>
using namespace std;
long long tot = 0;
long long ph[11000];
void decomp(long long n) {
  for (int i = 1; i * i <= n; i++) {
    if (n % i == 0) {
      ph[++tot] = i;
      ph[++tot] = n / i;
    }
    if (i * i == n) tot--;
  }
}
int main() {
  long long n, a, b, c, mx = -9999999, mn = 99999999999999;
  cin >> n;
  decomp(n);
  for (int i = 1; i <= tot; i++)
    for (int j = 1; j <= tot; j++) {
      a = ph[i];
      b = ph[j];
      c = n / a / b;
      if (a * b * c != n) continue;
      mx = max(mx, (long long)(a + 1) * (b + 2) * (c + 2) - n);
      mn = min(mn, (long long)(a + 1) * (b + 2) * (c + 2) - n);
    }
  cout << mn << " " << mx;
  return 0;
}
