#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  vector<long long> as;
  for (long long i = 1; i * i <= n; ++i)
    if (n % i == 0) {
      as.push_back(i);
      as.push_back(n / i);
    }
  long long ans1 = (long long)1e18, ans2 = 0;
  for (int i = 0; i < as.size(); ++i) {
    long long a = as[i];
    for (long long b = 1; n / a / b >= b; ++b) {
      if ((n % (a * b)) == 0) {
        long long c = n / a / b;
        long long m = (a + 1) * (b + 2) * (c + 2);
        ans1 = min(ans1, m - n);
        ans2 = max(ans2, m - n);
      }
    }
  }
  cout << ans1 << " " << ans2 << endl;
  return 0;
}
