#include <bits/stdc++.h>
using namespace std;
template <class T>
void checkmin(T &a, T b) {
  if (b < a) a = b;
}
template <class T>
void checkmax(T &a, T b) {
  if (b > a) a = b;
}
template <class T>
T sqr(T x) {
  return x * x;
}
template <class T>
T gcd(T a, T b) {
  if (a < 0) return gcd(-a, b);
  if (b < 0) return gcd(a, -b);
  return (b == 0) ? a : gcd(b, a % b);
}
template <class T>
void out(vector<T> A, int n = -1) {
  if (n == -1) n = ((int)A.size());
  if (n > ((int)A.size())) n = ((int)A.size());
  cout << "{";
  for (int i = 0; i < n; i++) cout << A[i] << " ";
  cout << "}" << endl;
}
template <class T>
void out(T A[], int n) {
  cout << "{";
  for (int i = 0; i < n; i++) cout << A[i] << " ";
  cout << "}" << endl;
}
string tostring(int v) {
  ostringstream sout;
  sout << v;
  return sout.str();
}
string tostring(long long v) {
  ostringstream sout;
  sout << v;
  return sout.str();
}
int low(int i) { return i & -i; }
int countbit(int i) { return (i == 0) ? 0 : (1 + countbit(i - low(i))); }
int toint(string s) {
  istringstream sin(s);
  int t;
  sin >> t;
  return t;
}
long long toint64(string s) {
  istringstream sin(s);
  long long t;
  sin >> t;
  return t;
}
const double pi = acos(-1.);
const double eps = 1e-11;
long long a[100005];
int main() {
  long long n;
  int m = 0;
  cin >> n;
  for (long long i = 1; i * i <= n; i++)
    if (n % i == 0) {
      a[m] = i;
      m++;
      a[m] = n / i;
      m++;
    }
  long long ans1 = 1ll << 59, ans2 = -ans1;
  for (int i = 0; i < m; i++)
    for (int j = 0; j < m; j++) {
      long long k = n / a[i] / a[j];
      if (k == 0) continue;
      if (k * a[i] * a[j] != n) continue;
      checkmin(ans1, (a[i] + 1) * (a[j] + 2) * (k + 2) - n);
      checkmax(ans2, (a[i] + 1) * (a[j] + 2) * (k + 2) - n);
    }
  cout << ans1 << " " << ans2 << endl;
  return 0;
}
