#include <bits/stdc++.h>
using namespace std;
int n;
long long mn = 1e18, mx;
int main() {
  cin >> n;
  long long a;
  for (long long a = 1; a * a * a <= n; a++) {
    if (n % a == 0)
      for (long long b = a; b * b <= n; b++) {
        long long c;
        if ((n / a) % b == 0) {
          long long c = n / a / b;
          mn = min(mn, (a + 1) * (b + 2) * (c + 2) - n);
          mn = min(mn, (b + 1) * (c + 2) * (a + 2) - n);
          mn = min(mn, (c + 1) * (a + 2) * (b + 2) - n);
          mx = max(mx, (a + 1) * (b + 2) * (c + 2) - n);
          mx = max(mx, (b + 1) * (c + 2) * (a + 2) - n);
          mx = max(mx, (c + 1) * (a + 2) * (b + 2) - n);
        }
      }
  }
  cout << mn << " " << mx;
}
