#include <bits/stdc++.h>
const double EPS = 1e-24;
const long long int MOD = 1000000007ll;
const double PI = 3.14159265359;
int INF = 2147483645;
template <class T>
T Max2(T a, T b) {
  return a < b ? b : a;
}
template <class T>
T Min2(T a, T b) {
  return a < b ? a : b;
}
template <class T>
T Max3(T a, T b, T c) {
  return Max2(Max2(a, b), c);
}
template <class T>
T Min3(T a, T b, T c) {
  return Min2(Min2(a, b), c);
}
template <class T>
T Max4(T a, T b, T c, T d) {
  return Max2(Max2(a, b), Max2(c, d));
}
template <class T>
T Min4(T a, T b, T c, T d) {
  return Min2(Min2(a, b), Max2(c, d));
}
using namespace std;
long long int N;
vector<long long int> v;
long long int ansmax = -1, ansmin = 1000000000000000000ll;
void solve(long long int i, long long int j, long long int k) {
  if ((i * j * k) < N) return;
  ansmax = Max2(ansmax, (i + 1) * (j + 2) * (k + 2) - N);
  ansmin = Min2(ansmin, (i + 1) * (j + 2) * (k + 2) - N);
}
int main() {
  std::ios::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> N;
  long long int t = sqrt(N);
  for (long long int i = 1; i <= t; i++)
    if (N % i == 0) v.push_back(i), v.push_back(N / i);
  sort(v.begin(), v.end());
  for (int i = 0; i < v.size(); i++)
    for (int j = 0; j < v.size(); j++) solve(v[i], v[j], N / v[i] / v[j]);
  cout << ansmin << " " << ansmax;
  return 0;
}
