#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  unsigned long long minn = ULLONG_MAX,
                     maxn = (unsigned long long)(n + 1) * 3 * 3 - n;
  int tmp = sqrt(n);
  for (int i = 1; i <= tmp; i++) {
    if (n % i == 0) {
      n /= i;
      int tmp2 = sqrt(n / i);
      for (int j = tmp; j >= 1; j--) {
        if (n % j == 0) {
          minn = min(minn, (unsigned long long)(i + 1) * (j + 2) * (n / j + 2));
        }
      }
      n *= i;
    }
  }
  printf("%llu %llu", minn - n, maxn);
}
