#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n;
  cin >> n;
  long long int ans_min = 1000000000000000000;
  long long int ans_max = -1;
  for (long long int i = 1; i * i * i <= n; ++i) {
    if (n % i != 0) continue;
    for (long long int j = i; j * j <= n; ++j) {
      if (n % (i * j) != 0) continue;
      long long int k = (n / i) / j;
      long long int v[3];
      v[0] = (i + 1) * (j + 2) * (k + 2);
      v[1] = (j + 1) * (i + 2) * (k + 2);
      v[2] = (k + 1) * (i + 2) * (j + 2);
      for (auto &x : v) {
        ans_min = min(ans_min, x);
        ans_max = max(ans_max, x);
      }
    }
  }
  cout << ans_min - n << " " << ans_max - n << endl;
  return 0;
}
