#include <bits/stdc++.h>
using namespace std;
void solve(long long n) {
  long long A, B, C;
  long long A1, B2, C2;
  long long minres = numeric_limits<long long>::max();
  long long maxres = numeric_limits<long long>::min();
  for (A1 = 1; A1 <= n / A1; A1++) {
    if (n % A1 == 0) {
      long long a1[2] = {A1, n / A1};
      for (int i = 0; i < 2; i++) {
        long long n1 = n / (a1[i]);
        A = a1[i] + 1;
        for (B2 = 1; B2 <= n1 / B2; B2++) {
          if (n1 % B2 == 0) {
            B = B2 + 2;
            C = (n1 / B2) + 2;
            long long dif =
                2 * A * B + 2 * A * C - 4 * A + B * C - 2 * B - 2 * C + 4;
            minres = std::min(minres, dif);
            maxres = std::max(maxres, dif);
          }
        }
      }
    }
  }
  cout << minres << " " << maxres << endl;
}
inline void init() {}
int main() {
  init();
  int n;
  while (cin >> n) {
    solve(n);
  }
  return 0;
}
