#include <bits/stdc++.h>
using namespace std;
long long ma, n, i, j, temp;
long long mi = 1000LL * 1000LL * 1000LL * 1000LL * 1000LL * 1000LL;
int main() {
  cin >> n;
  for (i = 1; i * i * i <= n; i++)
    if (n % i == 0)
      for (j = i; j * j <= n / i; j++)
        if ((n / i) % j == 0) {
          temp = (n / i) / j;
          ma = max(ma, (i + 2) * (j + 2) * (temp + 1));
          ma = max(ma, (i + 2) * (j + 1) * (temp + 2));
          ma = max(ma, (i + 1) * (j + 2) * (temp + 2));
          mi = min(mi, (i + 2) * (j + 2) * (temp + 1));
          mi = min(mi, (i + 2) * (j + 1) * (temp + 2));
          mi = min(mi, (i + 1) * (j + 2) * (temp + 2));
        }
  cout << mi - n << " " << ma - n << endl;
  return 0;
}
