#include <bits/stdc++.h>
using namespace std;
long long gcd(long long n1, long long n2) {
  if (n1 % n2 == 0) return n2;
  return gcd(n2, n1 % n2);
}
long long powmod(long long base, long long exponent) {
  long long ans = 1;
  while (exponent) {
    if (exponent & 1) ans = (ans * base) % 1000000007;
    base = (base * base) % 1000000007;
    exponent /= 2;
  }
  return ans;
}
vector<long long> compute(long long n) {
  vector<long long> ret;
  ret.clear();
  long long i;
  for (i = 1; i * i < n; i++)
    if (n % i == 0) {
      ret.push_back(i);
      ret.push_back(n / i);
    }
  if (i * i == n) ret.push_back(i);
  return ret;
}
vector<long long> l1;
vector<long long> l2;
vector<long long> l3;
int main() {
  long long n, i, j, k, a, b, c;
  long long mx = -1LL * 1000000000000000000;
  long long mn = 1LL * 1000000000000000000;
  cin >> n;
  l1 = compute(n);
  for (i = 0; i < l1.size(); i++) {
    a = l1[i];
    l2.clear();
    l2 = compute(n / a);
    for (j = 0; j < l2.size(); j++) {
      b = l2[j];
      c = (n / (a * b));
      mx = max(mx, (a + 1) * (b + 2) * (c + 2) - n);
      mn = min(mn, (a + 1) * (b + 2) * (c + 2) - n);
    }
  }
  cout << mn << " " << mx;
  return 0;
}
