#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  long long n;
  long long mx = 0;
  long long mn = numeric_limits<long long>::max();
  cin >> n;
  for (long long a = 1; a * a <= n; ++a)
    if (n % a == 0) {
      long long m = n / a;
      for (long long b = 1; b * b <= m; ++b)
        if (m % b == 0) {
          long long c = m / b;
          long long x = (a + 1) * (b + 2) * (c + 2) - n;
          long long y = (a + 2) * (b + 1) * (c + 2) - n;
          long long z = (a + 2) * (b + 2) * (c + 1) - n;
          mn = min(x, min(y, min(z, mn)));
          mx = max(x, max(y, max(z, mx)));
        }
    }
  cout << mn << ' ' << mx << endl;
  return 0;
}
