#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  long long Max = 0, Min = (1ll << 60);
  for (int i = 1; i * i * i <= n; i++)
    if (n % i == 0)
      for (int j = i; j * j * i <= n; j++)
        if ((n / i) % j == 0) {
          int k = n / i / j;
          Min = min(Min, min((k + 1ll) * (j + 2) * (i + 2),
                             min((k + 2ll) * (j + 1) * (i + 2),
                                 (k + 2ll) * (j + 2) * (i + 1))));
          Max = max(Max, max((k + 1ll) * (j + 2) * (i + 2),
                             max((k + 2ll) * (j + 1) * (i + 2),
                                 (k + 2ll) * (j + 2) * (i + 1))));
        }
  cout << Min - n << " " << Max - n << endl;
}
