#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1000010;
const long long INF = (1ll << 62);
long long res[MAXN][2];
int n;
void solve() {
  long long res0 = 0, res1 = INF;
  for (int lim1 = pow((double)n, 1.0 / 3.0), i = 1; i <= lim1; ++i) {
    if (n % i) continue;
    int k = n / i;
    for (int lim2 = sqrt((double)k), j = i; j <= lim2; ++j) {
      if (k % j) continue;
      res0 = max(res0, (long long)(i + 2) * (j + 2) * (k / j + 1));
      res1 = min(res1, (long long)(i + 1) * (j + 2) * (k / j + 2));
    }
  }
  res1 -= n;
  res0 -= n;
  cout << res1 << ' ' << res0 << endl;
}
int main() {
  scanf("%d", &n);
  solve();
  return 0;
}
