#include <bits/stdc++.h>
using namespace std;
const long long N = 1000010;
long long sum[N], cnt = 0;
void check(long long n) {
  long long m = sqrt(n);
  for (long long i = 1; i <= m; i++) {
    if (n % i == 0) {
      sum[++cnt] = i;
      sum[++cnt] = n / i;
    }
  }
}
signed main() {
  long long n, Min = 1e11, Max = 0, f = 0, f2 = 0;
  cin >> n;
  check(n);
  for (long long i = 1; i <= cnt; i++) {
    for (long long j = 1; j <= cnt; j++) {
      long long k = (n / sum[i]) / sum[j];
      if (n != sum[i] * sum[j] * k) continue;
      long long ans1 = (sum[i] + 1) * (sum[j] + 2) * (k + 2) - n;
      long long ans2 = (sum[i] + 2) * (sum[j] + 1) * (k + 2) - n;
      long long ans3 = (sum[i] + 2) * (sum[j] + 2) * (k + 1) - n;
      Min = min(Min, min(ans1, min(ans2, ans3)));
      Max = max(Max, max(ans1, max(ans2, ans3)));
    }
  }
  cout << Min << " " << Max << "\n";
  return 0;
}
