#include <bits/stdc++.h>
using namespace std;
const long long MOD = 998244353;
const long long N = 1e5 + 5;
vector<long long> vp;
long long n;
long long a[N];
long long binsearch(long long lo, long long hi, long long check) {
  long long ans = -1;
  while (hi >= lo) {
    long long mid = (lo + hi) / 2;
    if (a[mid] * check == n) {
      return mid;
    } else if (a[mid] * check < n) {
      lo = mid + 1;
    } else {
      hi = mid - 1;
    }
  }
  return ans;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> n;
  for (long long i = 1; i * i <= n; i++) {
    if (n % i == 0) {
      vp.push_back(n / i);
      if (n / i != i) vp.push_back(i);
    }
  }
  sort(vp.begin(), vp.end());
  for (long long i = 1; i <= vp.size(); i++) {
    a[i] = vp[i - 1];
  }
  long long mx = 0;
  long long mn = 1e18;
  for (long long i = 0; i < vp.size(); i++) {
    for (long long j = 0; j < vp.size(); j++) {
      long long k = binsearch(1, vp.size(), vp[i] * vp[j]);
      if (k != -1) {
        k--;
        if (vp[i] * vp[j] * vp[k] == n) {
          mn = min(mn, (vp[i] + 1) * (vp[j] + 2) * (vp[k] + 2) - n);
          mn = min(mn, (vp[i] + 2) * (vp[j] + 2) * (vp[k] + 1) - n);
          mn = min(mn, (vp[i] + 2) * (vp[j] + 1) * (vp[k] + 2) - n);
          mx = max(mx, (vp[i] + 1) * (vp[j] + 2) * (vp[k] + 2) - n);
          mx = max(mx, (vp[i] + 2) * (vp[j] + 2) * (vp[k] + 1) - n);
          mx = max(mx, (vp[i] + 2) * (vp[j] + 1) * (vp[k] + 2) - n);
        }
      }
    }
  }
  cout << mn << " " << mx << '\n';
}
