#include <bits/stdc++.h>
using namespace std;
int cx[] = {-1, 0, 0, 1, -1, -1, 1, 1, 0},
    cy[] = {0, -1, 1, 0, -1, 1, 1, -1, 0};
int ingrid(int ii, int jj, int R, int C) {
  if (ii < 0 || jj < 0 || ii >= R || jj >= C) return 0;
  return 1;
}
int main() {
  long long n;
  cin >> n;
  long long maxx = -1, minn = (1LL << 60);
  for (int i = 1; i <= sqrt(n); i++) {
    long long a = i;
    if (n % a == 0) {
      long long c = n / a;
      for (int i = a; i <= sqrt(c); i++) {
        if (c % i == 0) {
          long long b = c / i;
          long long c = i;
          long long temp = (a + 1) * (b + 2) * (c + 2);
          minn = min(minn, temp);
          maxx = max(maxx, temp);
          temp = (b + 1) * (a + 2) * (c + 2);
          minn = min(minn, temp);
          maxx = max(maxx, temp);
          temp = (c + 1) * (a + 2) * (b + 2);
          minn = min(minn, temp);
          maxx = max(maxx, temp);
        }
      }
    }
  }
  cout << minn - n << " " << maxx - n << endl;
  return 0;
}
