#include <bits/stdc++.h>
#pragma comment(linker, "/stack:67108864")
using namespace std;
template <class T>
T abs(T a) {
  return (a) > 0 ? (a) : -(a);
}
template <class T>
T sqr(T a) {
  return (a) * (a);
}
const long double PI = 3.1415926535897932, EPS = 1E-9;
const int INF = 1000 * 1000 * 1000, NMAX = 100005;
int main() {
  long long n;
  cin >> n;
  vector<long long> divs;
  long long sn = (long long)sqrtl(n + 0.0);
  for (long long i = 1; i <= sn; i++) {
    if (n % i == 0) {
      divs.push_back(i);
    }
  }
  long long mn = LLONG_MAX, mx = LLONG_MIN;
  for (int i = 0; i < int((divs).size()); ++i)
    for (int j = 0; j < int((divs).size()); ++j) {
      if (n % (divs[i] * divs[j]) != 0) continue;
      long long c = n / (divs[i] * divs[j]);
      mn = min(mn, (divs[i] + 1) * (divs[j] + 2) * (c + 2) - n);
      mx = max(mx, (divs[i] + 1) * (divs[j] + 2) * (c + 2) - n);
    }
  for (int i = 0; i < int((divs).size()); ++i)
    for (int j = 0; j < int((divs).size()); ++j) {
      if (n % (divs[i] * divs[j]) != 0) continue;
      long long c = n / (divs[i] * divs[j]);
      mn = min(mn, (divs[i] + 2) * (divs[j] + 2) * (c + 1) - n);
      mx = max(mx, (divs[i] + 2) * (divs[j] + 2) * (c + 1) - n);
    }
  cout << mn << ' ' << mx;
  return 0;
}
