#include <bits/stdc++.h>
using namespace std;
vector<long long> v;
int main() {
  ios_base::sync_with_stdio(false);
  int n;
  cin >> n;
  for (int i = 1; i * i <= n; ++i) {
    if (n % i == 0) {
      v.push_back(i);
      if (n / i != i) v.push_back(n / i);
    }
  }
  long long MIN = 100000000000000000ll, MAX = 0;
  for (int i = 0; i < v.size(); ++i) {
    for (int j = 0; j < v.size(); ++j) {
      if (n % (v[i] * v[j]) == 0) {
        long long p1 = v[i];
        long long p2 = v[j];
        long long p3 = n / (v[i] * v[j]);
        long long Q = (p1 + 1ll) * (p2 + 2ll) * (p3 + 2ll);
        if (Q > MAX) MAX = Q;
        if (Q < MIN) MIN = Q;
      }
    }
  }
  cout << MIN - n << " " << MAX - n << endl;
  return 0;
}
