#include <bits/stdc++.h>
using namespace std;
long long n, i, j, k, z, m2 = 1000000000;
long long w[500000], o = 0;
int main() {
  scanf("%I64d", &n);
  m2 = m2 * m2;
  for (i = 1; i * i <= n; i++)
    if (n % i == 0) w[++o] = i, w[++o] = n / i;
  sort(w + 1, w + o + 1);
  for (i = 1; w[i] * w[i] * w[i] <= n && i <= o; i++)
    for (j = 1; w[i] * w[j] * w[j] <= n && j <= o; j++)
      for (k = 1; w[i] * w[j] * w[k] <= n && k <= o; k++) {
        if (w[i] * w[j] * w[k] == n) {
          m2 = min(m2, (w[i] + 1) * (w[j] + 2) * (w[k] + 2));
        }
      }
  printf("%I64d %I64d\n", m2 - n, 9 * (n + 1) - n);
  return 0;
}
