#include <bits/stdc++.h>
using namespace std;
long long max(long long a, long long b) { return (a > b ? a : b); }
long long min(long long a, long long b) { return (a > b ? b : a); }
int da[] = {0, 1, 2, 2};
int db[] = {0, 2, 1, 2};
int dc[] = {0, 2, 2, 1};
int main() {
  long long n;
  scanf("%I64d", &n);
  long long Min = (1LL << 60), Max = 0;
  for (long long a = 1000; a >= 1; a--) {
    if (n % a == 0) {
      long long h = n / a;
      long long k = sqrt(h);
      for (int b = k + 2; b >= 1; b--) {
        if (h % b == 0) {
          long long c = h / b;
          for (int i = 1; i <= 3; i++) {
            Min = min(Min, (a + da[i]) * (b + db[i]) * (c + dc[i]));
            Max = max(Max, (a + da[i]) * (b + db[i]) * (c + dc[i]));
          }
        }
      }
    }
  }
  printf("%I64d %I64d\n", Min - n, Max - n);
  return 0;
}
