#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 7;
int main() {
  long long n;
  cin >> n;
  long long minv = 3 * 3 * (n + 1);
  for (long long i = 1; i <= 100000; i++) {
    if (n % i == 0) {
      for (long long j = 1; j <= 100000; j++) {
        if (n % (i * j) == 0) {
          long long c = n / i / j;
          minv = min(minv, (min(min(i, j), c) + 1) * (max(max(i, j), c) + 2) *
                               (i + j + c - min(min(i, j), c) -
                                max(max(i, j), c) + 2));
        }
      }
    }
  }
  cout << minv - n << " " << 3 * 3 * (n + 1) - n << endl;
  return 0;
}
