#include <bits/stdc++.h>
using namespace std;
int main() {
  long long x;
  vector<long long> vec;
  cin >> x;
  for (int i = 1; i * i <= x; i++) {
    if (x % i == 0) {
      vec.push_back(i);
      long long m = x / i;
      if (m != i) {
        vec.push_back(m);
      }
    }
  }
  unsigned long long mn = 1e18, mx = 0;
  for (int i = 0; i < vec.size(); i++) {
    for (int j = 0; j < vec.size(); j++) {
      unsigned long long a, b, c, d;
      a = vec[i];
      b = vec[j];
      unsigned long long low = 1, high = 1e18, mid;
      while (low <= high) {
        mid = (low + high) / 2;
        if (a * b * mid <= x) {
          c = mid;
          if (a * b * c == x) {
            mn = min((a + 1) * (b + 2) * (c + 2) - x, mn);
            mx = max((a + 1) * (b + 2) * (c + 2) - x, mx);
          }
          low = mid + 1;
        } else {
          high = mid - 1;
        }
      }
    }
  }
  cout << mn << " " << mx << endl;
  return 0;
}
