#include <bits/stdc++.h>
using namespace std;
const int N = 100005;
inline int in() {
  int x;
  scanf("%d", &x);
  return x;
}
inline long long lin() {
  long long x;
  scanf("%I64d", &x);
  return x;
}
long long n, a, b;
int main() {
  n = lin();
  a = 1ll * 1e18;
  b = 1ll * -1e18;
  for (long long p = 1; p <= 35000; p++) {
    if (p > n) continue;
    if (n % p == 0) {
      long long aa = p, bb = n / p;
      for (long long q = 1; q * q <= bb; q++) {
        if (bb % q == 0) {
          long long x = q, y = bb / q;
          a = min(a, (aa + 1ll) * (x + 2ll) * (y + 2ll));
          b = max(b, (aa + 1ll) * (x + 2ll) * (y + 2ll));
        }
      }
      for (long long q = 1; q * q <= aa; q++) {
        if (aa % q == 0) {
          long long x = q, y = aa / q;
          a = min(a, (bb + 1ll) * (x + 2ll) * (y + 2ll));
          b = max(b, (bb + 1ll) * (x + 2ll) * (y + 2ll));
        }
      }
    }
  }
  cout << a - n << " " << b - n << '\n';
}
