#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 7;
long long n;
int main() {
  scanf("%d", &n);
  long long mn = 1e18, mx = -1;
  for (long long a = 1; a * a * a <= n; a++)
    if ((n % a) == 0)
      for (long long b = a; b * b <= (n / a); b++)
        if ((n / a) % b == 0) {
          long long c = (n / a) / b;
          long long k1, k2, k3;
          k1 = (a + 1) * (b + 2) * (c + 2);
          k2 = (b + 1) * (a + 2) * (c + 2);
          k3 = (c + 1) * (b + 2) * (a + 2);
          mx = max(mx, max(k1, max(k2, k3)));
          mn = min(mn, min(k1, min(k2, k3)));
        }
  printf("%lld %lld\n", mn - n, mx - n);
  return 0;
}
