#include <bits/stdc++.h>
using namespace std;
int main() {
  long long num, d;
  scanf("%lld", &num);
  long long max, min = 9223372036854775807LL;
  long long b, a, i, j, maxi, maxj;
  max = (num + 1) * 3 * 3 - num;
  maxi = sqrt((double)num);
  for (i = 1; i <= maxi + 1; i++) {
    if (num % i == 0) {
      a = num / i;
      maxj = sqrt((double)a);
      for (j = 1; j <= maxj + 1; j++) {
        if (a % j == 0) {
          b = a / j;
          if ((d = (i + 1) * (j + 2) * (b + 2) - num) < min) min = d;
        }
      }
    }
  }
  printf("%lld %lld\n", min, max);
  return 0;
}
