#include <bits/stdc++.h>
using namespace std;
int N;
long long mx = 0, mn = 2e18;
int main() {
  scanf("%d", &N);
  for (int Ni = 1; Ni * Ni <= N; Ni++) {
    if (N % Ni == 0) {
      int p;
      p = N / Ni;
      for (int Nj = 1; Nj * Nj <= p; Nj++) {
        if (p % Nj == 0) {
          int t = p / Nj;
          long long q = (long long)(Ni + 1) * (Nj + 2) * (t + 2) - N;
          mx = max(mx, q);
          mn = min(mn, q);
        }
      }
      p = Ni;
      for (int Nj = 1; Nj * Nj <= p; Nj++) {
        if (p % Nj == 0) {
          int t = p / Nj;
          long long q = (long long)(N / Ni + 1) * (Nj + 2) * (t + 2) - N;
          mx = max(mx, q);
          mn = min(mn, q);
        }
      }
    }
  }
  cout << mn << " " << mx << endl;
}
