#include <bits/stdc++.h>
using namespace std;
const long long INF = 1000000000000000000LL;
const int diri[8] = {-1, 0, 1, 0, -1, 1, 1, -1};
const int dirj[8] = {0, 1, 0, -1, 1, 1, -1, -1};
vector<pair<int, int> > v;
long long mini, maxi;
long long numb[2];
void back(int num, int p) {
  int m = v.size();
  if (num == 2) {
    long long a = numb[0], b = numb[1];
    long long c = 1;
    for (int i = 0; i < m; ++i) {
      for (int j = 0; j < v[i].second; ++j) c *= v[i].first;
    }
    long long d = (a + 1) * (b + 2) * (c + 2) - a * b * c;
    mini = min(mini, d);
    maxi = max(maxi, d);
    return;
  }
  if (p == m) {
    back(num + 1, 0);
    return;
  }
  long long t = numb[num];
  for (int i = 0; i <= v[p].second; ++i) {
    v[p].second -= i;
    back(num, p + 1);
    v[p].second += i;
    numb[num] *= v[p].first;
  }
  numb[num] = t;
}
int main() {
  int n;
  cin >> n;
  for (int i = 2; i * i <= n; ++i) {
    if (n % i == 0) {
      int q = 0;
      while (n % i == 0) {
        n /= i;
        ++q;
      }
      v.push_back(pair<int, int>(i, q));
    }
  }
  if (n > 1) v.push_back(pair<int, int>(n, 1));
  numb[0] = numb[1] = 1;
  mini = INF;
  maxi = -INF;
  back(0, 0);
  cout << mini << " " << maxi << endl;
}
