#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n;
  cin >> n;
  long long mn = 2e18, mx = -1;
  for (long long x = 1; x * x <= n; ++x) {
    if (n % x) continue;
    for (long long y = 1; y * y <= n / x; ++y) {
      long long z = n / x;
      if (z % y) continue;
      z /= y;
      long long hm[3];
      hm[0] = (x + 1) * (y + 2) * (z + 2);
      hm[1] = (x + 2) * (y + 1) * (z + 2);
      hm[2] = (x + 2) * (y + 2) * (z + 1);
      for (int i = 0; i <= 2; ++i) {
        mn = min(mn, hm[i] - n);
        mx = max(mx, hm[i] - n);
      }
    }
  }
  cout << mn << " " << mx << "\n";
  return 0;
}
