#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  long long minm = 922372036854775807, maks = 9223372036854775808 * -1, a, pos1,
            pos2, pos3;
  cin >> n;
  for (int i = 1; i * i * i <= n; i++) {
    if (n % i == 0) {
      for (int j = 1; j * j <= n / i; j++) {
        if ((n / i) % j == 0) {
          a = n / (i * j);
          pos1 = (a + 1) * (i + 2) * (j + 2);
          pos2 = (a + 2) * (i + 1) * (j + 2);
          pos3 = (a + 2) * (i + 2) * (j + 1);
          maks = max(maks, max(pos1, max(pos2, pos3)));
          minm = min(minm, min(pos1, min(pos2, pos3)));
        }
      }
    }
  }
  cout << minm - n << " " << maks - n << endl;
  return 0;
}
