#include <bits/stdc++.h>
using namespace std;
long long res_min = (long long)1E18;
long long res_max = (long long)0;
int n;
void process_c(int b, int c) {
  int a = n / b / c;
  long long v =
      (long long)(a + 1) * (long long)(b + 2) * (long long)(c + 2) - n;
  if (v > 0) {
    res_min = min(v, res_min);
    res_max = max(v, res_max);
  }
}
void process_b(int b) {
  int d = n / b;
  for (int i = 1; i * i <= d; i++) {
    if (d % i == 0) {
      process_c(b, i);
      process_c(b, d / i);
    }
  }
}
int main() {
  cin >> n;
  for (int i = 1; i * i <= n; i++) {
    if (n % i == 0) {
      process_b(i);
      process_b(n / i);
    }
  }
  cout << res_min << " " << res_max << "\n";
  return 0;
}
