#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  long long max = 0, min = 10e17;
  for (long long A = 1; A * A <= n; ++A) {
    if (n % A == 0) {
      long long a = A;
      for (long long b = 1; b * b <= n / a; ++b) {
        if ((n / a) % b == 0) {
          long long c = n / a / b;
          long long res = (a + 1) * (b + 2) * (c + 2) - a * b * c;
          if (res > max) max = res;
          if (res < min) min = res;
        }
      }
      a = n / A;
      for (long long b = 1; b * b <= n / a; ++b) {
        if ((n / a) % b == 0) {
          long long c = n / a / b;
          long long res = (a + 1) * (b + 2) * (c + 2) - a * b * c;
          if (res > max) max = res;
          if (res < min) min = res;
        }
      }
    }
  }
  cout << min << ' ' << max;
  return 0;
}
