#include <bits/stdc++.h>
using namespace std;
vector<int> getf(int a) {
  vector<int> ret;
  int i;
  for (i = 1; i * i <= a; i++) {
    if (a % i == 0) {
      ret.push_back(i);
      ret.push_back(a / i);
    }
  }
  return ret;
}
int main() {
  int N;
  cin >> N;
  vector<int> v, v2;
  v = getf(N);
  long long mx = 0, mn = 1LL << 61;
  for (int i = 0; i < v.size(); i++) {
    int A = v[i];
    v2 = getf(N / A);
    for (int j = 0; j < v2.size(); j++) {
      int B = v2[j];
      int C = N / A / B;
      long long p = A;
      p *= B;
      p *= C;
      long long p2 = A + 1;
      p2 *= B + 2;
      p2 *= C + 2;
      p2 -= p;
      mx = max(mx, p2);
      mn = min(mn, p2);
    }
  }
  cout << mn << ' ' << mx;
}
