#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (a < b) return (gcd(b, a));
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  long long A, B, C, n, maxx = 0, minn = 1000000000000000;
  cin >> n;
  for (A = 1; A * A * A <= n; A++) {
    if (n % A == 0) {
      for (B = A; B * B <= n / A; B++) {
        if (n % (A * B) == 0) {
          C = n / (A * B);
          if (C >= B) {
            maxx = max(maxx, (A + 1) * (B + 2) * (C + 2));
            maxx = max(maxx, (A + 2) * (B + 2) * (C + 1));
            maxx = max(maxx, (A + 2) * (B + 1) * (C + 2));
            minn = min(minn, (A + 1) * (B + 2) * (C + 2));
            minn = min(minn, (A + 2) * (B + 1) * (C + 2));
            minn = min(minn, (A + 2) * (B + 2) * (C + 1));
          }
        }
      }
    }
  }
  minn = minn - n;
  maxx = maxx - n;
  cout << minn << " " << maxx << endl;
}
