#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  long long max = (long long)(1 + n) * 3 * 3 - n;
  long long min = numeric_limits<long long>::max();
  for (int i = floor(sqrt(n)); i > 0; i--) {
    if (n % i == 0) {
      for (int j = floor(sqrt(n / i)); j > 0; --j) {
        if ((n / i) % j == 0) {
          long long min_n = (long long)(i + 1) * (j + 2) * (n / i / j + 2) - n;
          if (min_n < min) {
            min = min_n;
          }
        }
      }
    }
  }
  printf("%I64d %I64d\n", min, max);
  return 0;
}
