#include <bits/stdc++.h>
using namespace std;
long long n, MaxAns, MinAns, t;
long long a, b, c;
int main() {
  scanf("%I64d", &n);
  MaxAns = (n + 1) * 3 * 3 - n;
  MinAns = (n + 1) * 3 * 3 - n;
  for (int i = 1; i * i <= n; i++) {
    if (n % i) continue;
    a = i;
    t = n / i;
    for (int j = 1; j * j <= t; j++) {
      if (t % j) continue;
      b = j;
      c = t / j;
      MaxAns = max((a + 1) * (b + 2) * (c + 2) - n, MaxAns);
      MinAns = min((a + 1) * (b + 2) * (c + 2) - n, MinAns);
    }
  }
  printf("%I64d %I64d\n", MinAns, MaxAns);
  return 0;
}
