#include <bits/stdc++.h>
using namespace std;
vector<long long> Factor(long long n) {
  vector<long long> div;
  for (int i = 1; i * i <= n; i++) {
    if (n % i == 0) {
      div.push_back(i);
      if (i != n / i) div.push_back(n / i);
    }
  }
  return div;
}
int main() {
  long long n;
  scanf("%I64d", &n);
  vector<long long> divs = Factor(n);
  long long Max = 0, Min = (long long)1e18;
  for (int i = 0; i < divs.size(); i++) {
    for (int j = i; j < divs.size(); j++) {
      if (n % (divs[j] * divs[i]) == 0) {
        long long x = (n / (divs[i] * divs[j]));
        Min = min(Min, ((divs[i] + 2) * (divs[j] + 2) * (x + 1)) - n);
        Min = min(Min, ((divs[i] + 2) * (divs[j] + 1) * (x + 2)) - n);
        Min = min(Min, ((divs[i] + 1) * (divs[j] + 2) * (x + 2)) - n);
        Max = max(Max, ((divs[i] + 2) * (divs[j] + 2) * (x + 1)) - n);
        Max = max(Max, ((divs[i] + 2) * (divs[j] + 1) * (x + 2)) - n);
        Max = max(Max, ((divs[i] + 1) * (divs[j] + 2) * (x + 2)) - n);
      }
    }
  }
  printf("%I64d %I64d\n", Min, Max);
  return 0;
}
