#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, a, b, c;
  cin >> n;
  long long int min1 = pow(10, 28);
  long long int max1 = 0, t1, t2;
  for (long long int a = 1; a * a * a <= n; ++a) {
    if (n % a == 0) {
      for (long long int b = a; b * b <= n / a; ++b) {
        if ((n / a) % b == 0) {
          long long int c = (n / a) / b;
          t1 = (a + 1) * (b + 2) * (c + 2);
          max1 = max(max1, t1 - n);
          min1 = min(min1, t1 - n);
          t1 = (b + 1) * (a + 2) * (c + 2);
          max1 = max(max1, t1 - n);
          min1 = min(min1, t1 - n);
          t1 = (c + 1) * (a + 2) * (b + 2);
          max1 = max(max1, t1 - n);
          min1 = min(min1, t1 - n);
        }
      }
    }
  }
  cout << min1 << " " << max1;
  return 0;
}
