#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, i, j, k, res1, ans;
  long long MIN = 1000000000000;
  long long MAX = -MIN;
  cin >> n;
  for (i = 1; i * i <= n; i++) {
    if (n % i) continue;
    res1 = n / i;
    for (j = 1; j * j <= res1; j++) {
      if (res1 % j) continue;
      k = res1 / j;
      ans = (i + 1) * (j + 2) * (k + 2) - i * j * k;
      MAX = max(MAX, ans);
      MIN = min(MIN, ans);
      ans = (i + 2) * (j + 1) * (k + 2) - i * j * k;
      MAX = max(MAX, ans);
      MIN = min(MIN, ans);
      ans = (i + 2) * (j + 2) * (k + 1) - i * j * k;
      MAX = max(MAX, ans);
      MIN = min(MIN, ans);
    }
  }
  cout << MIN << " " << MAX << endl;
}
