#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  long long Min = 100000000000000;
  long long Max = -1;
  for (long long a = 1; a * a * a <= n; ++a)
    if (n % a == 0) {
      for (long long b = a; b * b <= n / a; ++b)
        if ((n / a) % b == 0) {
          long long c = n / a / b;
          Min = min(Min, min((a + 1) * (b + 2) * (c + 2) - n,
                             min((a + 2) * (b + 1) * (c + 2) - n,
                                 (a + 2) * (b + 2) * (c + 1) - n)));
          Max = max(Max, max((a + 1) * (b + 2) * (c + 2) - n,
                             max((a + 2) * (b + 1) * (c + 2) - n,
                                 (a + 2) * (b + 2) * (c + 1) - n)));
        }
    }
  cout << Min << ' ' << Max << endl;
  return 0;
}
