#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, j;
  long long mn = -1, mx = -1, n;
  vector<long long> v;
  cin >> n;
  v.push_back(1);
  v.push_back(n);
  for (i = 2; i * i <= n; i++) {
    if (n % i == 0) {
      v.push_back(i);
      v.push_back(n / i);
    }
  }
  sort(v.begin(), v.end());
  for (i = 0; i < v.size(); i++) {
    for (j = i + 1; j < v.size(); j++) {
      if ((n / v[i]) % v[j] == 0) {
        if (mn == -1) mn = (v[i] + 1) * (v[j] + 2) * ((n / v[i]) / v[j] + 2);
        mn = min(mn, (v[i] + 1) * (v[j] + 2) * ((n / v[i]) / v[j] + 2));
        mn = min(mn, (v[i] + 2) * (v[j] + 1) * ((n / v[i]) / v[j] + 2));
        mn = min(mn, (v[i] + 2) * (v[j] + 2) * ((n / v[i]) / v[j] + 1));
        mx = max(mx, (v[i] + 1) * (v[j] + 2) * ((n / v[i]) / v[j] + 2));
        mx = max(mx, (v[i] + 2) * (v[j] + 1) * ((n / v[i]) / v[j] + 2));
        mx = max(mx, (v[i] + 2) * (v[j] + 2) * ((n / v[i]) / v[j] + 1));
      }
    }
  }
  cout << mn - n << " " << mx - n;
  return 0;
}
