#include <bits/stdc++.h>
using namespace std;
vector<int> v;
int main() {
  int n;
  scanf("%d", &n);
  long long min_x = (~(1LL << 63)), max_x = -1;
  long long i = 1;
  for (; i * i < n; ++i)
    if (n % i == 0) v.emplace_back(i), v.emplace_back(n / i);
  if (n % i == 0) v.emplace_back(n);
  int b, c, m;
  for (const auto &a : v) {
    m = n / a;
    i = 1;
    for (; i * i <= m; ++i)
      if (m % i == 0) {
        b = i, c = m / i;
        long long t = 1ll * (a + 1) * (b + 2) * (c + 2) - n;
        if (t < min_x) min_x = t;
        if (t > max_x) max_x = t;
      }
  }
  printf("%I64d %I64d", min_x, max_x);
  return 0;
}
