#include <bits/stdc++.h>
using namespace std;
const int N = 25;
int main(int argc, char *argv[]) {
  long long n;
  cin >> n;
  long long ret1 = (1LL << 60);
  long long ret2 = 0;
  for (long long x = 1; x * x <= n; ++x) {
    if (n % x) continue;
    long long m = n / x;
    for (long long y = 1; y * y <= m; ++y) {
      if ((n / x) % y) continue;
      long long z = m / y;
      long long a = x + 1;
      long long b = y + 2;
      long long c = z + 2;
      ret1 = min(a * b * c - n, ret1);
      ret2 = max(a * b * c - n, ret2);
      b = x + 2;
      c = z + 2;
      a = y + 1;
      ret1 = min(a * b * c - n, ret1);
      ret2 = max(a * b * c - n, ret2);
      a = z + 1;
      b = x + 2;
      c = y + 2;
      ret1 = min(a * b * c - n, ret1);
      ret2 = max(a * b * c - n, ret2);
    }
  }
  cout << ret1 << " " << ret2 << "\n";
  return 0;
}
