#include <bits/stdc++.h>
using namespace std;
long long N, ans, ans2 = 1e15;
int main() {
  scanf("%lld", &N);
  for (int a = 1; a * a <= N; ++a) {
    if (N % a == 0) {
      int K = N / a;
      for (int b = 1; b * b <= K; ++b) {
        if (K % b == 0) {
          int c = K / b;
          ans = max(ans, (long long)(a + 1) * (b + 2) * (c + 2));
          ans2 = min(ans2, (long long)(a + 1) * (b + 2) * (c + 2));
        }
      }
      K = a;
      for (int b = 1; b * b <= K; ++b) {
        if (K % b == 0) {
          int c = K / b;
          ans = max(ans, (long long)(N / a + 1) * (b + 2) * (c + 2));
          ans2 = min(ans2, (long long)(N / a + 1) * (b + 2) * (c + 2));
        }
      }
    }
  }
  printf("%lld %lld\n", ans2 - N, ans - N);
  return 0;
}
