#include <bits/stdc++.h>
const double eps = 1e-8;
using namespace std;
int main() {
  long long A, B, C, n, Min = 10000000000000000LL, z, Max = 0;
  cin >> n;
  vector<long long> D;
  for (long long i = 1; i <= sqrt(n); i++) {
    if (n % i == 0) {
      D.push_back(i);
      D.push_back(n / i);
    }
  }
  sort(D.begin(), D.end());
  for (long long i = 0; i < D.size(); i++) {
    long long t1 = n / D[i];
    A = D[i] + 1;
    for (long long j = 0; j < D.size(); j++)
      if (t1 % D[j] == 0) {
        long long t2 = t1 / D[j];
        B = D[j] + 2;
        C = t2 + 2;
        Max = max(Max, A * B * C - n);
        Min = min(Min, A * B * C - n);
      }
  }
  cout << Min << ' ' << Max;
  return 0;
}
