#include <bits/stdc++.h>
using namespace std;
bool b[33333];
vector<int> pri;
vector<pair<int, int> > fac;
int n;
void init() {
  for (int i = 2; i < 33333; ++i) {
    if (!b[i]) {
      pri.push_back(i);
      for (int j = i + i; j < 33333; j += i) {
        b[j] = false;
      }
    }
  }
}
long long minans = 10000000000000000ll;
long long maxans = 0;
void dfs2(int x, int now, int last) {
  if (x == fac.size()) {
    long long t = (long long)(last + 2) * (now + 2) * (n / last / now + 1) - n;
    minans = min(minans, t);
    maxans = max(maxans, t);
    t = (long long)(last + 1) * (now + 2) * (n / last / now + 2) - n;
    minans = min(minans, t);
    maxans = max(maxans, t);
    return;
  }
  int t = fac[x].second;
  for (; fac[x].second >= 0; --fac[x].second) {
    dfs2(x + 1, now, last);
    now *= fac[x].first;
  }
  fac[x].second = t;
}
void dfs(int x, int now) {
  if (x == fac.size()) {
    dfs2(0, 1, now);
    return;
  }
  int t = fac[x].second;
  for (; fac[x].second >= 0; --fac[x].second) {
    dfs(x + 1, now);
    now *= fac[x].first;
  }
  fac[x].second = t;
}
int main() {
  init();
  cin >> n;
  int orgn = n;
  for (int i = 0; i < pri.size(); ++i) {
    if (n % pri[i] == 0) {
      int s = 0;
      while (n % pri[i] == 0) {
        s++;
        n /= pri[i];
      }
      fac.push_back(make_pair(pri[i], s));
    }
  }
  if (n != 1) fac.push_back(make_pair(n, 1));
  n = orgn;
  dfs(0, 1);
  cout << minans << ' ' << maxans << endl;
  ;
  return 0;
}
