#include <bits/stdc++.h>
using namespace std;
const int INF = 1 << 29;
const double eps = 1e-8;
const int N = 100000 + 2;
vector<int> p;
long long n, a, b, c;
int main() {
  cin >> n;
  for (long long i = 1; i * i <= n; ++i)
    if (n % i == 0) {
      p.push_back(i);
      if (i * i != n) p.push_back(n / i);
    }
  long long mmin = (long long)3 * 3 * (n + 1);
  for (int i = 0; i < p.size(); ++i) {
    a = p[i];
    for (int j = 0; j < p.size(); ++j) {
      if ((n / a) % p[j] == 0) {
        b = n / a / p[j];
        c = p[j];
        if (mmin > (a + 2) * (b + 2) * (c + 1))
          mmin = (a + 2) * (b + 2) * (c + 1);
      }
    }
  }
  cout << mmin - n << ' ' << (long long)3 * 3 * (n + 1) - n;
  return 0;
}
