#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
const double EPS = 1e-9;
long long int N;
vector<long long int> X;
int main(void) {
  cin >> N;
  for (long long int A = 1; A * A <= N; A++) {
    if (N % A) continue;
    X.push_back(A);
    if (A * A != N) X.push_back(N / A);
  }
  long long int Min = 1000000000000LL, Max = 0LL;
  int CntDivisors = X.size();
  for (int i = 0; i < CntDivisors; i++)
    for (int j = 0; j < CntDivisors; j++) {
      if (N % (X[i] * X[j])) continue;
      long long int A = X[i] + 1LL;
      long long int B = X[j] + 2LL;
      long long int C = N / (X[i] * X[j]) + 2LL;
      long long int Cnt = A * B * C - N;
      if (Cnt < Min) Min = Cnt;
      if (Cnt > Max) Max = Cnt;
    }
  cout << Min << " " << Max << endl;
  return 0;
}
