#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int ai, bi, ci, am, bm, cm;
  long long mi = (200000000000ll), ma = -1;
  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) {
          long long a = i + 1, b = j + 2, c = n / (i * j) + 2;
          mi = min(mi, (a * b * c) - n);
          ma = max(ma, (a * b * c) - n);
          a = i + 2;
          b = j + 1;
          c = n / (i * j) + 2;
          mi = min(mi, (a * b * c) - n);
          ma = max(ma, (a * b * c) - n);
          a = i + 2;
          b = j + 2;
          c = n / (i * j) + 1;
          mi = min(mi, (a * b * c) - n);
          ma = max(ma, (a * b * c) - n);
        }
      }
    }
  cout << mi << " " << ma;
  return 0;
}
