#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e15;
int n;
long long maxValue, minValue;
void initData() {
  scanf("%d", &n);
  maxValue = -1;
  minValue = INF;
  for (int i = 1; i * i <= n; ++i)
    if (n % i == 0) {
      int p = n / i;
      for (int j = 1; j * j <= p; ++j)
        if (p % j == 0) {
          int k = p / j;
          maxValue = max(maxValue, (long long)(i + 1) * (j + 2) * (k + 2));
          maxValue = max(maxValue, (long long)(i + 2) * (j + 1) * (k + 2));
          maxValue = max(maxValue, (long long)(i + 2) * (j + 2) * (k + 1));
          minValue = min(minValue, (long long)(i + 1) * (j + 2) * (k + 2));
          minValue = min(minValue, (long long)(i + 2) * (j + 1) * (k + 2));
          minValue = min(minValue, (long long)(i + 2) * (j + 2) * (k + 1));
        }
    }
  cout << minValue - n << ' ' << maxValue - n << endl;
}
int main() {
  initData();
  return 0;
}
