#include <bits/stdc++.h>
using namespace std;
int main() {
  long long ans1 = 0, ans2, n, i, j, besti, t, k;
  cin >> n;
  ans2 = (n + 1) * 3 * 3 - n;
  ans1 = ans2;
  for (i = 1; i * i <= n; i++) {
    if (n % i == 0)
      for (j = 1; j * j <= n / i; j++) {
        besti = n / i;
        if (besti % j != 0) continue;
        long long tmp = (i + 1) * (j + 2) * (n / (i * j) + 2) - n;
        if (ans1 > tmp) {
          ans1 = tmp;
          t = i, k = j;
        }
      }
  }
  cout << ans1 << " " << ans2 << endl;
  return 0;
}
