#include <bits/stdc++.h>
using namespace std;
const int inf = 0x7fffffff;
const long long infll = 1ll << 61;
int main() {
  long long n;
  while (~scanf("%I64d", &n)) {
    long long min = infll;
    long long max = (long long)(n + 1) * 9;
    long long s = sqrt(n + .5);
    for (long long i = 1; i <= s; ++i) {
      if (n % i == 0)
        for (long long j = 1; j <= s; ++j) {
          if (n % (i * j) == 0) {
            long long p = n / i / j;
            long long tmp = (long long)(i + 2) * (j + 1) * (p + 2);
            if (tmp > max) max = tmp;
            if (tmp < min) min = tmp;
          }
        }
    }
    printf("%I64d %I64d\n", min - n, max - n);
  }
  return 0;
}
