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