#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  long long minans = (long long)1e10;
  long long maxans = -1;
  for (int a = 1; a * a <= n; ++a) {
    if (n % a == 0) {
      int k = n / a;
      for (int b = 1; b * b <= k; ++b) {
        if (k % b == 0) {
          long long cur =
              (long long)(a + 1) * (long long)(b + 2) * (long long)(k / b + 2) -
              (long long)(a) * (long long)(b) * (long long)(k / b);
          minans = min(minans, cur);
          maxans = max(maxans, cur);
        }
      }
      k = a;
      for (int b = 1; b * b <= k; ++b) {
        if (k % b == 0) {
          long long cur =
              (long long)(n / a + 1) * (long long)(b + 2) *
                  (long long)(k / b + 2) -
              (long long)(n / a) * (long long)(b) * (long long)(k / b);
          minans = min(minans, cur);
          maxans = max(maxans, cur);
        }
      }
    }
  }
  cout << minans << ' ' << maxans << endl;
  return 0;
}
