#include <bits/stdc++.h>
using namespace std;
int n;
bool notPrime[31625] = {1, 1};
vector<int> pr;
vector<pair<int, int> > A, B;
void fact(int n, vector<pair<int, int> > &v) {
  v.clear();
  for (int i = 0; i < pr.size() && pr[i] * pr[i] <= n; ++i)
    if (n % pr[i] == 0) {
      v.push_back(make_pair(pr[i], 0));
      while (n % pr[i] == 0) {
        n /= pr[i];
        ++v.back().second;
      }
    }
  if (n != 1) v.push_back(make_pair(n, 1));
}
long long mn = 1ll << 62, mx = 0;
long long a, b, c;
void calc2(int i, int x) {
  if (i == B.size()) {
    b = x;
    c = n / a / b;
    mn = min(mn, (a + 1) * (b + 2) * (c + 2) - n);
    mx = max(mn, (a + 1) * (b + 2) * (c + 2) - n);
    return;
  }
  for (int j = 0; j <= B[i].second; ++j) {
    calc2(i + 1, x);
    x *= B[i].first;
  }
}
void calc1(int i, int x) {
  if (i == A.size()) {
    a = x;
    fact(n / x, B);
    calc2(0, 1);
    return;
  }
  for (int j = 0; j <= A[i].second; ++j) {
    calc1(i + 1, x);
    x *= A[i].first;
  }
}
int main() {
  for (int i = 2; i * i < 31625; ++i)
    if (!notPrime[i])
      for (int j = i * i; j < 31625; j += i) notPrime[j] = true;
  for (int i = 2; i < 31625; ++i)
    if (!notPrime[i]) pr.push_back(i);
  scanf("%d", &n);
  fact(n, A);
  calc1(0, 1);
  cout << mn << " " << mx << endl;
  return 0;
}
