#include <bits/stdc++.h>
using namespace std;
long long n;
int main(int argc, char *argv[]) {
  cin >> n;
  long long i, j, k;
  long long minA = LONG_LONG_MAX;
  long long maxA = LONG_LONG_MIN;
  for (i = 1; i * i <= n; i++) {
    if (n % i == 0) {
      long long m = n / i;
      for (j = 1; j * j <= m; j++) {
        if (m % j == 0) {
          k = m / j;
          minA = min(minA, (i + 1) * (j + 2) * (k + 2) - n);
          minA = min(minA, (i + 2) * (j + 1) * (k + 2) - n);
          minA = min(minA, (i + 2) * (j + 2) * (k + 1) - n);
          maxA = max(maxA, (i + 1) * (j + 2) * (k + 2) - n);
          maxA = max(maxA, (i + 2) * (j + 1) * (k + 2) - n);
          maxA = max(maxA, (i + 2) * (j + 2) * (k + 1) - n);
        }
      }
    }
  }
  cout << minA << " " << maxA << endl;
  return 0;
}
