#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a, i, j, min, max;
  cin >> a;
  min = -1;
  max = 8 * a + 9;
  for (i = 1; i * i * i <= a; i++)
    if (a % i == 0)
      for (j = sqrt(a / i); j > 0; j--)
        if ((a / i) % j == 0) {
          if (min == -1 || (i + 1) * (j + 2) * (a / i / j + 2) - a < min)
            min = (i + 1) * (j + 2) * (a / i / j + 2) - a;
          break;
        }
  cout << min << " " << max << endl;
  return 0;
}
