#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a, b, c, n, i, j, k, max1 = 0, min1 = LLONG_MAX, product;
  cin >> n;
  for (a = 1; a * a * a <= n; ++a) {
    if (n % a == 0) {
      for (b = a; b * b <= n / a; ++b) {
        if ((n / a) % b == 0) {
          c = (n / a) / b;
          i = a + 2, j = b + 2, k = c + 1;
          if (i * j * k - a * b * c > max1) max1 = i * j * k - a * b * c;
          if (i * j * k - a * b * c < min1) min1 = i * j * k - a * b * c;
          i = b + 2, j = c + 2, k = a + 1;
          if (i * j * k - a * b * c > max1) max1 = i * j * k - a * b * c;
          if (i * j * k - a * b * c < min1) min1 = i * j * k - a * b * c;
          i = c + 2, j = a + 2, k = b + 1;
          if (i * j * k - a * b * c > max1) max1 = i * j * k - a * b * c;
          if (i * j * k - a * b * c < min1) min1 = i * j * k - a * b * c;
        }
      }
    }
  }
  cout << min1 << " " << max1;
  return 0;
}
