#include <bits/stdc++.h>
using namespace std;
long long n;
int main() {
  scanf("%I64d", &n);
  long long sol1, sol2, a, b, c, d;
  sol1 = sol2 = (n + 1) * 9;
  for (a = 1; a * a * a <= n; ++a) {
    if (n % a != 0) continue;
    for (b = a; a * b * b <= n; ++b) {
      if (n % (a * b) != 0) continue;
      c = n / (a * b);
      if (c < b) break;
      d = (a + 1) * (b + 2) * (c + 2);
      sol1 = min(sol1, d);
      sol2 = max(sol2, d);
    }
  }
  for (c = 1; c * c * c <= n; ++c) {
    if (n % c != 0) continue;
    for (b = c; c * b * b <= n; ++b) {
      if (n % (b * c) != 0) continue;
      a = n / (b * c);
      if (a < b) break;
      d = (a + 1) * (b + 2) * (c + 2);
      sol1 = min(sol1, d);
      sol2 = max(sol2, d);
    }
  }
  printf("%I64d %I64d\n", sol1 - n, sol2 - n);
  return 0;
}
