#include <bits/stdc++.h>
using namespace std;
const long double E = 1e-4;
const int MOD = 1e9 + 7;
const long long MAX = 1e6 + 1;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long n;
  cin >> n;
  long long min_ans = LONG_LONG_MAX;
  for (long long i = 1; i * i * i <= n; i++) {
    if (n % i != 0) continue;
    long long g = n / i;
    for (long long j = sqrt(g); j > 0; j--)
      if (g % j == 0) {
        min_ans = min(min_ans, (i + 1) * (j + 2) * (g / j + 2));
      }
  }
  cout << min_ans - n << " " << n * 8 + 9 << "\n";
}
