#include <bits/stdc++.h>
using namespace std;
long long int v[200010];
int main() {
  long long int i, j, k;
  long long int n, t;
  long long a, b, c, min, max;
  while (scanf("%I64d", &n) != EOF) {
    min = 1e18;
    max = -1e18;
    int cnt = 0;
    for (i = 1; i * i <= n; i++)
      if (n % i == 0) v[cnt++] = i, v[cnt++] = n / i;
    for (i = 0; i < cnt; i++) {
      a = v[i] + 1;
      long long t1 = n / v[i];
      for (j = 0; j < cnt; j++)
        if (t1 % v[j] == 0) {
          b = v[j] + 2;
          c = t1 / v[j] + 2;
          if (max < a * b * c - n) max = a * b * c - n;
          if (min > a * b * c - n) min = a * b * c - n;
        }
    }
    printf("%I64d %I64d\n", min, max);
  }
  return 0;
}
