#include <bits/stdc++.h>
using namespace std;
const int MaxN = int(2e5);
const long double pi = 3.1415926535897932384626433832795;
long long n;
int main() {
  while (scanf("%I64d", &n) >= 1) {
    long long maxx = 0;
    long long minn = (long long)1e18;
    for (long long a = 1; a * a * a <= n; a++) {
      for (long long b = 1; b * b <= n / a; b++) {
        if (n % (a * b) != 0) continue;
        long long c = n / a / b;
        long long na = a + 2;
        long long nb = b + 2;
        long long nc = c + 1;
        maxx = max(maxx, na * nb * nc - a * b * c);
        minn = min(minn, na * nb * nc - a * b * c);
        na = a + 2;
        nb = b + 1;
        nc = c + 2;
        maxx = max(maxx, na * nb * nc - a * b * c);
        minn = min(minn, na * nb * nc - a * b * c);
        na = a + 1;
        nb = b + 2;
        nc = c + 2;
        maxx = max(maxx, na * nb * nc - a * b * c);
        minn = min(minn, na * nb * nc - a * b * c);
      }
    }
    printf("%I64d %I64d\n", minn, maxx);
  }
  return 0;
}
