#include <bits/stdc++.h>
using namespace std;
const long long inf = 2e18 + 100;
long long n, a, b, c;
signed main() {
  cin >> n;
  long long ans = inf;
  for (a = 1; a <= sqrt(n); a++) {
    if (n % a != 0) continue;
    for (b = 1; b <= sqrt(n); b++) {
      if (n % (a * b) == 0) {
        c = n / (a * b);
        ans = min(ans, (a + 1) * (b + 2) * (c + 2) - n);
        ans = min(ans, (a + 2) * (b + 1) * (c + 2) - n);
        ans = min(ans, (a + 2) * (b + 2) * (c + 1) - n);
      }
    }
  }
  cout << ans << " ";
  cout << (n + 1) * 3 * 3 - n << "\n";
}
