#include <bits/stdc++.h>
using namespace std;
inline int read() {
  register int x = 0, f = 1, ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (isdigit(ch)) {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
long long mi = -1, ma = -1;
void fs(int a, int b, int c) {
  if (mi == -1) ma = mi = a * 1ll * b * 1ll * c;
  mi = min(mi, a * 1ll * b * 1ll * c);
  ma = max(ma, a * 1ll * b * 1ll * c);
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  for (int i = 1; i * i * i <= n; i++) {
    if (n % i == 0) {
      for (int j = 1; i * j * j <= n; j++) {
        if (n / i % j == 0) {
          int d = n / i / j;
          fs(i + 1, j + 2, d + 2);
          fs(i + 2, j + 2, d + 1);
          fs(i + 2, j + 1, d + 2);
        }
      }
    }
  }
  cout << mi - n << " " << ma - n << '\n';
  return 0;
}
