#include <bits/stdc++.h>
using namespace std;
int n;
long long mn = 1000000000000000009LL;
long long mx = -1;
void check_new(int a_1, int b_2) {
  int c_2 = (n / (a_1)) / b_2;
  int a = a_1 + 1;
  int b = b_2 + 2;
  int c = c_2 + 2;
  long long ans = a * (b + 0LL) * c - n;
  mn = min(mn, ans);
  mx = max(mx, ans);
}
void check(int a_1) {
  int ost = n / a_1;
  for (int k = 1; k * k <= ost; k++)
    if (ost % k == 0) {
      check_new(a_1, k);
      check_new(a_1, ost / k);
    }
}
int main() {
  cin >> n;
  for (int j = 1; j * j <= n; j++)
    if (n % j == 0) {
      check(j);
      check(n / j);
    }
  cout << mn << " " << mx;
  return 0;
}
