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