#include <bits/stdc++.h>
int main() {
  int n;
  scanf("%d", &n);
  long long mn = 1LL << 62, mx;
  int a, b;
  for (a = 1; a * a * a <= n; ++a) {
    for (b = a; a * b * b <= n; ++b) {
      if (n % (a * b) == 0) {
        long long o = 1LL * (a + 1) * (b + 2) * (n / (a * b) + 2) - n;
        if (mn > o) mn = o;
      }
    }
  }
  mx = (n + 1) * 9LL - n;
  printf("%I64d %I64d\n", mn, mx);
  return 0;
}
