#include <bits/stdc++.h>
using namespace std;
const int inf = (1 << 30) - 1;
const long double eps = 1e-9;
const long double pi = fabs(atan2(0.0, -1.0));
int *ass;
void ML() {
  for (;;) {
    ass = new int[2500000];
    for (int i = 0; i < 2500000; i++) ass[i] = rand();
  }
}
int m;
void LoAd() { cin >> m; }
void SoLvE() {
  vector<int> divs;
  divs.push_back(1);
  int in = (int)min(1.0 * m, sqrt(1.0 * m) + 2);
  for (int i = 2; i < in; i++)
    if (0 == m % i) divs.push_back(i);
  vector<long long> res;
  for (int i = 0; i < (int)divs.size(); i++) {
    long long a = divs[i];
    for (int j = i; j < (int)divs.size(); j++) {
      long long b = divs[j];
      if (0 != m % (a * b)) continue;
      long long c = m / (a * b);
      if (0 == c) break;
      res.push_back((a + 1) * (b + 2) * (c + 2));
      res.push_back((a + 2) * (b + 1) * (c + 2));
      res.push_back((a + 2) * (b + 2) * (c + 1));
      c = 0;
    }
  }
  sort(res.begin(), res.end());
  cout << res[0] - m << " " << res[res.size() - 1] - m;
}
int main() {
  srand((int)time(NULL));
  LoAd();
  SoLvE();
  return 0;
}
