#include <bits/stdc++.h>
using namespace std;
long long n;
long long ans1 = LONG_LONG_MAX, ans2 = 0;
int s[3][3] = {{1, 2, 2}, {2, 1, 2}, {2, 2, 1}};
void solve() {
  int t = (int)sqrt((double)n);
  long long a, b, c;
  for (a = 1; a <= t; ++a) {
    if (n % a == 0) {
      int x = n / a;
      int tt = (int)(sqrt((double)x));
      for (b = 1; b <= tt; ++b) {
        if (x % b == 0) {
          c = n / a / b;
          for (int i = 0; i < 3; ++i) {
            long long tmp = (a + s[i][0]) * (b + s[i][1]) * (c + s[i][2]);
            ans1 = min(tmp, ans1);
            ans2 = max(tmp, ans2);
          }
        }
      }
    }
  }
}
int main(int argc, char** argv) {
  cin >> n;
  solve();
  cout << ans1 - n << " " << ans2 - n << endl;
  return 0;
}
