#include <bits/stdc++.h>
using namespace std;
const int INF = 1 << 29;
int main() {
  long long n;
  cin >> n;
  long long ma = 0;
  long long mi = 1LL << 50;
  for (int i = 1; i * i <= n; ++i) {
    if (n % i == 0) {
      for (int j = 1; j * j <= n / i; ++j) {
        if ((n / i) % j == 0) {
          vector<long long> a(3);
          a[0] = i;
          a[1] = j;
          a[2] = n / i / j;
          sort((a).begin(), (a).end());
          long long tmp = (a[0] + 1) * (a[1] + 2) * (a[2] + 2) - n;
          ma = max(ma, (a[2] + 1) * (a[1] + 2) * (a[0] + 2) - n);
          mi = min(mi, (a[0] + 1) * (a[1] + 2) * (a[2] + 2) - n);
        }
      }
    }
  }
  cout << mi << " " << ma << endl;
}
