#include <bits/stdc++.h>
using namespace std;
int main(int argc, char *argv[]) {
  long long int n;
  while (cin >> n) {
    long long int mx = 0;
    long long int mn = 1LL << 60;
    for (long long int i = 1; i * i * i <= n; ++i) {
      for (long long int j = i; i * j * j <= n; ++j) {
        if (n % (i * j)) continue;
        long long int k = n / i / j;
        long long int m[] = {i, j, k};
        if (m[0] < m[1])
          ;
        else
          swap(m[0], m[1]);
        if (m[0] < m[2])
          ;
        else
          swap(m[0], m[2]);
        long long int x = (m[0] + 1LL) * (m[1] + 2LL) * (m[2] + 2LL);
        long long int y = (m[0] + 2LL) * (m[1] + 2LL) * (m[2] + 1LL);
        mn = min(mn, min(x, y));
        mx = max(mx, max(x, y));
      }
    }
    cout << mn - n << ' ' << mx - n << endl;
  }
  return 0;
}
