#include <bits/stdc++.h>
using namespace std;
void require(bool cond, const string& message = "Runtime error") {
  if (!cond) {
    cerr << message << endl;
    assert(false);
  }
}
void readData() {}
long long mina, maxa;
void solve(long long x, long long n) {
  long long m = n / x;
  for (long long y = 1; y * y <= m; ++y) {
    if (m % y) continue;
    long long z = m / y;
    long long nn = (x + 1) * (y + 2) * (z + 2);
    if (mina == -1) mina = nn - n;
    mina = min(mina, nn - n);
    maxa = max(maxa, nn - n);
  }
}
void solve() {
  long long n;
  cin >> n;
  mina = -1;
  maxa = 1;
  for (long long x = 1; x * x <= n; ++x) {
    if (n % x) continue;
    solve(x, n);
    solve(n / x, n);
  }
  cout << mina << " " << maxa << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  readData();
  solve();
  return 0;
}
