#include <bits/stdc++.h>
using namespace std;
const int INF = (int)1e9;
const long long INF64 = (long long)1e18;
const long double eps = 1e-9;
const long double pi = 3.14159265358979323846;
int main(void) {
  long long n;
  cin >> n;
  long long ansmin = INF64;
  long long ansmax = 0;
  vector<long long> del;
  for (long long i = 1; i * i <= n; i++) {
    if (n % i == 0) {
      del.push_back(i);
      del.push_back(n / i);
    }
  }
  for (int i = 0; i < int(del.size()); ++i) {
    vector<long long> h;
    h.push_back(del[i]);
    for (long long j = 1; j * j <= (n / del[i]); j++) {
      if ((n / del[i]) % j == 0) {
        h.push_back(j);
        h.push_back((n / del[i]) / j);
        sort(h.begin(), h.end());
        do {
          ansmax = max(ansmax, (h[0] + 1) * (h[1] + 2) * (h[2] + 2));
          ansmin = min(ansmin, (h[0] + 1) * (h[1] + 2) * (h[2] + 2));
        } while (next_permutation(h.begin(), h.end()));
        h.erase(h.begin(), h.end());
        h.push_back(del[i]);
      }
    }
  }
  cout << (ansmin - n) << " " << (ansmax - n);
}
