#include <bits/stdc++.h>
using namespace std;
long long power(long long x, long long y) {
  if (y == 0)
    return 1;
  else if (y % 2 == 0)
    return power(x, y / 2) * power(x, y / 2);
  else
    return x * power(x, y / 2) * power(x, y / 2);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n;
  cin >> n;
  long long max_steal, min_steal = (long long)1e18 + 9;
  max_steal = 8 * n + 9;
  long long ans_a = 1, ans_b = 1, ans_c = 1;
  for (long long a = 1; a * a * a <= n; a++) {
    if (n % a == 0) {
      for (long long b = a; b * b <= n / a; b++) {
        if ((n / a) % b == 0) {
          long long c = n / (a * b);
          min_steal = min(min_steal, (a + 2) * (b + 2) * (c + 1));
          min_steal = min(min_steal, (a + 2) * (b + 1) * (c + 2));
          min_steal = min(min_steal, (a + 1) * (b + 2) * (c + 2));
        }
      }
    }
  }
  min_steal -= n;
  cout << min_steal << " " << max_steal;
  return 0;
}
