#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, minc, maxc, i, j;
  cin >> n;
  maxc = minc = (n + 1) * 3 * 3 - n;
  for (i = 1; i * i * i <= n; i++)
    if (n % i == 0)
      for (j = 1; j * j <= n / i; j++)
        if (n / i % j == 0) {
          minc = min(minc, (i + 1) * (j + 2) * (n / i / j + 2) - n);
          minc = min(minc, (j + 2) * (i + 1) * (n / i / j + 2) - n);
          minc = min(minc, (i + 2) * (j + 2) * (n / i / j + 1) - n);
        }
  cout << minc << ' ' << maxc << endl;
}
