#include <bits/stdc++.h>
using namespace std;
long long int mx = -1;
long long int mi = INFINITY;
void consider(long long int a, long long int b, long long int c) {
  mx = max(mx, (a + 1) * (b + 2) * (c + 2));
  mi = min(mi, (a + 1) * (b + 2) * (c + 2));
  mx = max(mx, (a + 2) * (b + 1) * (c + 2));
  mi = min(mi, (a + 2) * (b + 1) * (c + 2));
  mx = max(mx, (a + 2) * (b + 2) * (c + 1));
  mi = min(mi, (a + 2) * (b + 2) * (c + 1));
}
int main() {
  long long int n;
  long long int A, B, C;
  cin >> n;
  for (long long int a = 1; a * a * a <= n; a++) {
    if (n % a == 0) {
      A = a;
      for (long long int b = 1; b * b <= n / a; b++) {
        if ((n / a) % b == 0) {
          B = b;
          C = (n / a) / b;
          consider(A, B, C);
        }
      }
    }
  }
  cout << mi - n << " " << mx - n << "\n";
}
