#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
const long long MAX = 2005;
vector<long long> divv;
int main() {
  long long k;
  cin >> k;
  for (long long i = 1; i * i <= k; i++) {
    if (k % i == 0) {
      divv.push_back(i);
      if (i * i != k) {
        divv.push_back(k / i);
      }
    }
  }
  long long minx = 10000000000000000;
  long long maxx = 0;
  for (long long i : divv) {
    for (long long j : divv) {
      if (k % (i * j) == 0) {
        long long rem = k / (i * j);
        long long a = (i + 1) * (j + 2) * (rem + 2);
        long long b = (i + 2) * (j + 2) * (rem + 1);
        long long c = (i + 2) * (j + 1) * (rem + 2);
        minx = min(minx, min(a, min(b, c)));
        maxx = max(maxx, max(a, max(b, c)));
      }
    }
  }
  cout << minx - k << " " << maxx - k << endl;
}
