#include <bits/stdc++.h>
using namespace std;
const long long INF = 1LL << 62;
long long min_n, max_n, n;
void func(long long a, long long m) {
  for (long long b = 1LL; b * b <= m; b++) {
    if (m % b == 0) {
      long long c = m / b;
      long long res = (a + 1LL) * (b + 2LL) * (c + 2LL);
      if (min_n > res) min_n = res;
      if (max_n < res) max_n = res;
    }
  }
}
int main() {
  cin >> n;
  min_n = INF, max_n = 0;
  for (long long a = 1LL; a * a <= n; a++) {
    if (n % a == 0) {
      func(a, n / a);
      func(n / a, a);
    }
  }
  cout << min_n - n << ' ' << max_n - n << endl;
  return 0;
}
