#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-8;
const double pi = acos(-1.0);
int dblcmp(double d) {
  if (fabs(d) < eps) return 0;
  return d > eps ? 1 : -1;
}
int main() {
  long long i, j, k;
  long long n;
  cin >> n;
  long long mi = 1LL << 62, mx = -1;
  for (i = 1; i <= 1000; i++) {
    for (j = 1; j <= 40000; j++) {
      if (n % (i * j)) continue;
      k = n / (i * j);
      long long a = i + 1, b = j + 2, c = k + 2;
      mi = min(mi, a * b * c - n);
      mx = max(mx, a * b * c - n);
      a = i + 2, b = j + 2, c = k + 1;
      mi = min(mi, a * b * c - n);
      mx = max(mx, a * b * c - n);
      a = i + 2, b = j + 1, c = k + 2;
      mi = min(mi, a * b * c - n);
      mx = max(mx, a * b * c - n);
    }
  }
  cout << mi << " " << mx << endl;
  return 0;
}
