#include <bits/stdc++.h>
using namespace std;
long long n, maxx, minn = 214748364700;
inline void work(long long a, long long b) {
  if (n % (a * b) != 0) return;
  long long c = n / (a * b);
  long long k = (a + 1) * (b + 2) * (c + 2) - a * b * c;
  maxx = max(maxx, k);
  minn = min(minn, k);
  k = (a + 2) * (b + 1) * (c + 2) - a * b * c;
  maxx = max(maxx, k);
  minn = min(minn, k);
  k = (a + 2) * (b + 2) * (c + 1) - a * b * c;
  maxx = max(maxx, k);
  minn = min(minn, k);
}
signed main() {
  cin >> n;
  for (long long a = 1; a <= (long long)pow(1.0 * n, 1.0 / 3) + 1; a++) {
    if (n % a == 0)
      for (long long b = 1; b * b <= n / a; b++) {
        if (n % b == 0) {
          work(a, b);
          work(a, n / b);
          work(n / a, b);
          work(n / a, n / b);
        }
      }
  }
  cout << minn << ' ' << maxx << endl;
}
