#include <bits/stdc++.h>
using namespace std;
const int dx[] = {1, -1, 0, 0};
const int dy[] = {0, 0, -1, 1};
int n;
long long Min, Max;
int main() {
  cin >> n;
  Min = 1 << 31;
  Min *= Min;
  for (int i = 1; i * i <= n; ++i)
    if (n % i == 0)
      for (int j = i; j * j <= n / i; ++j)
        if (n / i % j == 0) {
          int k = n / i / j;
          if (k < j) break;
          long long a = i, b = j, c = k;
          Min = min(Min, (a + 1) * (b + 2) * (c + 2));
          Max = max(Max, (c + 1) * (a + 2) * (b + 2));
        }
  cout << Min - n << " " << Max - n << endl;
}
