#include <bits/stdc++.h>
using namespace std;
using namespace std;
vector<int> vet;
int main() {
  int n, a, b, c;
  long long mini = 2000000000000000000LL, maxi = -2000000000000000000LL, val;
  scanf("%d", &n);
  for (a = 1; a * a * a <= n; a++)
    if (n % a == 0)
      for (b = a; b * b <= n / a; b++)
        if (n / a % b == 0) {
          c = n / a / b, vet.clear(), vet.push_back(a), vet.push_back(b),
          vet.push_back(c);
          do {
            val = 1LL * (vet[0] + 1LL) * (vet[1] + 2LL) * (vet[2] + 2LL) -
                  1LL * n,
            mini = min(mini, val), maxi = max(maxi, val);
          } while (next_permutation(vet.begin(), vet.end()));
        }
  cout << mini << ' ' << maxi << endl;
  return 0;
}
