#include <bits/stdc++.h>
using namespace std;
int main() {
  long long min = -1, max = -1;
  long long n, n2;
  cin >> n;
  long long nr = sqrt(n) + 1, nr2;
  long long k;
  for (long long i = 1; i <= nr; i++) {
    if (n % i != 0) continue;
    n2 = n / i;
    nr2 = sqrt(n) + 1;
    for (long long j = 1; j <= nr2; j++) {
      if (n2 % j != 0) continue;
      k = n2 / j;
      if (min == -1 && max == -1) {
        min = (i + 1) * (j + 2) * (k + 2);
        max = min;
      }
      if ((i + 1) * (j + 2) * (k + 2) < min) min = (i + 1) * (j + 2) * (k + 2);
      if ((i + 1) * (j + 2) * (k + 2) > max) max = (i + 1) * (j + 2) * (k + 2);
      if ((i + 2) * (j + 1) * (k + 2) < min) min = (i + 2) * (j + 1) * (k + 2);
      if ((i + 2) * (j + 1) * (k + 2) > max) max = (i + 2) * (j + 1) * (k + 2);
      if ((i + 2) * (j + 2) * (k + 1) < min) min = (i + 2) * (j + 2) * (k + 1);
      if ((i + 2) * (j + 2) * (k + 1) > max) max = (i + 2) * (j + 2) * (k + 1);
    }
  }
  cout << min - n << " " << max - n << endl;
  return 0;
}
