#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const long long INF = 0x3f3f3f3f;
long long n;
int main() {
  ios::sync_with_stdio(false);
  while (cin >> n) {
    long long max0 = 2000;
    long long ans1 = 0;
    long long ans2 = 1000000000000000000;
    for (long long i = 1; i <= min(n, max0); i++) {
      if (n % i == 0) {
        for (long long j = 1; j <= sqrt((double)(1.0 * n / i)); j++) {
          if ((n / i) % j == 0) {
            long long tmp = (n / i) / j;
            ans1 = max(ans1, (i + 1) * (j + 2) * (tmp + 2) - n);
            ans1 = max(ans1, (j + 1) * (i + 2) * (tmp + 2) - n);
            ans1 = max(ans1, (tmp + 1) * (i + 2) * (j + 2) - n);
            ans2 = min(ans2, (i + 1) * (j + 2) * (tmp + 2) - n);
            ans2 = min(ans2, (j + 1) * (i + 2) * (tmp + 2) - n);
            ans2 = min(ans2, (tmp + 1) * (i + 2) * (j + 2) - n);
          }
        }
      }
    }
    cout << ans2 << " " << ans1 << "\n";
  }
  return 0;
}
