#include <bits/stdc++.h>
using namespace std;
long long int mx = -1, mn = LLONG_MAX;
int n;
vector<pair<int, int> > v;
int power(int a, int b) {
  int p = 1;
  while (b--) {
    p *= a;
  }
  return p;
}
void rec(int ind, long long int a, long long int b, long long int c) {
  if (ind == n) {
    mx = max(mx, (a + 1) * (b + 2) * (c + 2));
    mn = min(mn, (a + 1) * (b + 2) * (c + 2));
    return;
  }
  int i, j, t = v[ind].second, p = v[ind].first;
  for (i = 0; i <= t; i++) {
    for (j = 0; i + j <= t; j++) {
      rec(ind + 1, a * power(p, i), b * power(p, j), c * power(p, t - (i + j)));
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int a, b;
  int i;
  cin >> a;
  b = a;
  for (i = 2; i * i <= a; i++) {
    if (a % i == 0) {
      v.push_back(make_pair(i, 0));
      while (a % i == 0) {
        v[v.size() - 1].second++;
        a /= i;
      }
    }
  }
  if (a != 1) {
    v.push_back(make_pair(a, 1));
  }
  n = v.size();
  rec(0, 1, 1, 1);
  cout << (mn - b) << " " << (mx - b);
  return 0;
}
