#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:64000000")
using namespace std;
int main() {
  long long n;
  cin >> n;
  long long minn = (1LL << 60), maxx = 0;
  for (int i = 1; i * i <= n; i++) {
    if (n % i != 0) continue;
    for (int j = 1; j * j <= (n / i); j++) {
      if ((n / i) % j != 0) continue;
      long long a = i + 1, b = ((n / i) / j) + 2, c = j + 2;
      if (a > 1 && b > 2 && c > 2) {
        minn = min(minn, a * b * c - (a - 1) * (b - 2) * (c - 2));
        maxx = max(maxx, a * b * c - (a - 1) * (b - 2) * (c - 2));
      }
    }
    for (int j = 1; j * j <= i; j++) {
      if (i % j != 0) continue;
      long long a = n / i + 1, b = (i / j) + 2, c = j + 2;
      if (a > 1 && b > 2 && c > 2) {
        minn = min(minn, a * b * c - (a - 1) * (b - 2) * (c - 2));
        maxx = max(maxx, a * b * c - (a - 1) * (b - 2) * (c - 2));
      }
    }
  }
  cout << minn << ' ' << maxx << endl;
  return 0;
}
