#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  long long x = -1, y = -1;
  for (long long a = 1; a * a <= n; a++) {
    if (n % a == 0) {
      long long m = n / a;
      for (long long b = a; b * b <= m; b++) {
        if (m % b == 0) {
          long long c = m / b;
          vector<long long> v(3);
          v[0] = a;
          v[1] = b;
          v[2] = c;
          sort(v.begin(), v.end());
          do {
            long long cur = (v[0] + 1) * (v[1] + 2) * (v[2] + 2);
            if (x == -1)
              x = cur;
            else
              x = min(x, cur);
            if (y == -1)
              y = cur;
            else
              y = max(y, cur);
          } while (next_permutation(v.begin(), v.end()));
        }
      }
    }
  }
  cout << x - n << " " << y - n << endl;
  return 0;
}
