#include <bits/stdc++.h>
using namespace std;
long long mod_v(long long num) {
  if (num >= 0)
    return (num % 1000000007);
  else
    return (num % 1000000007 + 1000000007) % 1000000007;
}
long long bigmod(long long b, long long p, long long m) {
  long long res = 1 % m, x = b % m;
  while (p) {
    if (p & 1) res = (res * x) % m;
    x = (x * x) % m;
    p >>= 1;
  }
  return res;
}
vector<int> v;
int main() {
  int n, m, A, B, C, len;
  long long mn = 2147383647LL * 2147383647LL, mx = 0, temp;
  scanf("%d", &n);
  int sq = sqrt(n);
  for (int i = 1; i < sq; i++) {
    if (n % i == 0) {
      v.push_back(i);
      v.push_back(n / i);
    }
  }
  if (n % sq == 0) v.push_back(sq);
  len = v.size();
  for (int i = 0; i < len; i++) {
    A = v[i] + 1;
    m = n / v[i];
    sq = sqrt(m);
    for (int j = 1; j <= sq; j++) {
      if (m % j == 0) {
        B = j + 2;
        C = (m / j) + 2;
        temp = (long long)A * (long long)B * (long long)C;
        mn = min(mn, temp - n);
        mx = max(mx, temp - n);
      }
    }
  }
  if (mx == -1)
    printf("-1\n");
  else
    cout << mn << " " << mx << endl;
}
