#include <bits/stdc++.h>
using namespace std;
void update(long long &maxx, long long &minn, long long a, long long b,
            long long c, long long n) {
  long long p = (a + 1) * (b + 2) * (c + 2) - n;
  maxx = max(maxx, p);
  minn = min(minn, p);
}
int main() {
  long long n;
  cin >> n;
  vector<long long> divisor;
  for (long long i = 1; i * i <= n; i++) {
    if (n % i == 0) {
      long long a = i;
      long long b = n / i;
      divisor.push_back(a);
      if (b != a) divisor.push_back(b);
    }
  }
  long long maxx = 0;
  long long minn = (1LL << 60);
  int sz = divisor.size();
  for (int i = 0; i < sz; i++) {
    for (int j = i; j < sz; j++) {
      long long a = divisor[i];
      long long b = divisor[j];
      if (n % (a * b) == 0) {
        long long c = n / a / b;
        update(maxx, minn, a, b, c, n);
        update(maxx, minn, b, a, c, n);
        update(maxx, minn, c, b, a, n);
      }
    }
  }
  cout << minn << " " << maxx << endl;
  return 0;
}
