#include <bits/stdc++.h>
using namespace std;
const long long int INF = (1LL << 51);
const long long int MRAD = (4 * 10100);
long long int n, ansl, ansh;
vector<long long int> d;
void enans(int i, int j) {
  long long int x;
  x = (d[i] + 1LL) * (d[j] + 2LL) * ((n / (d[i] * d[j])) + 2LL);
  ansl = min(ansl, x - n);
  ansh = max(ansh, x - n);
}
int main() {
  cin >> n;
  ansl = INF;
  ansh = -INF;
  long long int x;
  for (long long int i = 1LL; i < 35000LL; i += 1LL) {
    if (i > n) break;
    if (n % i != 0) continue;
    for (long long int j = i; j < 35000LL; j += 1LL) {
      if (i * j > n) break;
      if ((n / i) % j != 0) continue;
      x = (i + 1LL) * (j + 2LL) * ((n / (i * j)) + 2LL);
      ansl = min(ansl, x - n);
      ansh = max(ansh, x - n);
      x = (i + 2LL) * (j + 1LL) * ((n / (i * j)) + 2LL);
      ansl = min(ansl, x - n);
      ansh = max(ansh, x - n);
      x = (i + 2LL) * (j + 2LL) * ((n / (i * j)) + 1LL);
      ansl = min(ansl, x - n);
      ansh = max(ansh, x - n);
    }
  }
  cout << ansl << ' ' << ansh << '\n';
  return 0;
}
