#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long i, k, j, n, ans1 = 1e18 + 1, ans2 = 0;
  cin >> n;
  vector<long long> v;
  for (i = 1; i <= sqrt(n); i++) {
    if (n % i == 0) {
      long long f1 = i, f2 = n / i;
      if (f1 == f2)
        v.push_back(f1);
      else {
        v.push_back(f1);
        v.push_back(f2);
      }
    }
  }
  for (i = 0; i < v.size(); i++) {
    for (j = 0; j < v.size(); j++) {
      long long tmp = v[i] * v[j];
      if (n % tmp != 0) continue;
      long long num = n / tmp;
      long long nn = (v[i] + 1) * (v[j] + 2) * (num + 2);
      ans1 = min(ans1, nn - n);
      ans2 = max(ans2, nn - n);
    }
  }
  cout << ans1 << ' ' << ans2;
}
