#include <bits/stdc++.h>
using namespace std;
uint64_t minmum2(uint64_t n) {
  uint64_t minn = 0;
  bool minnset = false;
  for (uint64_t i = 1; i < (pow(n, 1.0 / 3.0) + 1); ++i) {
    if (n % i == 0) {
      uint64_t part2 = n / i;
      for (uint64_t j = 1; j < (sqrt(part2) + 1); ++j) {
        if (part2 % j == 0) {
          uint64_t n3 = part2 / j;
          if (minnset)
            minn = min(minn, (i + 1) * (j + 2) * (n3 + 2));
          else {
            minnset = true;
            minn = (i + 1) * (j + 2) * (n3 + 2);
          }
        }
      }
    }
  }
  return minn;
}
int main() {
  uint64_t n;
  cin >> n;
  cout << minmum2(n) - n << " " << (n + 1) * 3 * 3 - n;
  return 0;
}
