#include <bits/stdc++.h>
using namespace std;
vector<int> a;
int n, i, j, dn, x;
long long Min = 200000000000000000, Max = 0;
int main() {
  cin >> n;
  dn = n;
  for (i = 1; i * i <= n; i++)
    if (dn % i == 0) {
      a.push_back(i);
      if (dn != i * i) a.push_back(dn / i);
    }
  for (i = 0; i < a.size(); i++) {
    dn = n / a[i];
    for (j = 1; j * j <= dn; j++)
      if (dn % j == 0) {
        x = dn / j;
        Min = min(Min, (long long)(a[i] + 1) * (j + 2) * (x + 2));
        Max = max(Max, (long long)(a[i] + 1) * (j + 2) * (x + 2));
      }
  }
  cout << Min - n << " " << Max - n;
}
