#include <bits/stdc++.h>
using namespace std;
const long long inf = 1e18;
int main() {
  ios::sync_with_stdio(false);
  vector<long long> d;
  long long n;
  cin >> n;
  for (long long i = 1; i * i <= n; i++)
    if (n % i == 0) d.push_back(i), d.push_back(n / i);
  long long min_ans = inf, max_ans = 0;
  for (long long x : d) {
    for (long long y : d) {
      if (x * y <= n && n % (x * y) == 0) {
        long long val = (x + 1) * (y + 2) * (n / (x * y) + 2) - n;
        min_ans = min(min_ans, val);
        max_ans = max(max_ans, val);
      }
    }
  }
  cout << min_ans << " " << max_ans;
  return 0;
}
