#include <bits/stdc++.h>
using namespace std;
long long min(long long a, long long b) {
  if (a < b) return a;
  return b;
}
long long max(long long a, long long b) {
  if (a > b) return a;
  return b;
}
vector<long long> divisors(long long n) {
  vector<long long> d;
  int i;
  for (i = 1; i * i < n; ++i) {
    if (n % i == 0) d.push_back(i), d.push_back(n / i);
  }
  if (n % i == 0) d.push_back(i);
  return d;
}
int main() {
  long long n;
  cin >> n;
  vector<long long> v = divisors(n);
  sort(v.begin(), v.end());
  long long ans = 1e18;
  for (int i = 0; i < v.size(); ++i) {
    for (int j = i; j < v.size(); ++j) {
      if (v[i] * v[j] > n) break;
      long long x = n / (v[i] * v[j]);
      long double y = n * 1.00 / (v[i] * 1.00 * v[j] * 1.00);
      if (x == y) {
        long long a = min(v[i], x);
        long long b = max(v[i], x);
        ans = min(ans, (a + 1) * (v[j] + 2) * (b + 2) - n);
      }
    }
  }
  long long Max = 1ll * (n + 1) * 1ll * 3 * 1ll * 3 - n;
  cout << ans << " " << Max;
  return 0;
}
