#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a, b, c, n, Max = -1, Min = 1e18, cub = 1, x;
  cin >> n;
  vector<long long> dels;
  for (int i = 1; i < sqrt((double)n); i++)
    if (n % i == 0) {
      dels.push_back(i);
      dels.push_back(n / i);
    }
  long long p = sqrt((double)n);
  if (n % p == 0) dels.push_back(p);
  for (long long i = 0; i < dels.size(); i++)
    for (long long j = 0; j < dels.size(); j++)
      if (n % (dels[i] * dels[j]) == 0) {
        long long k = n / (dels[i] * dels[j]);
        x = (dels[i] + 1) * (dels[j] + 2) * (k + 2);
        Min = min(Min, x - n);
        Max = max(Max, x - n);
      }
  cout << Min << " " << Max;
}
