#include <bits/stdc++.h>
using namespace std;
const int INF = INT_MAX;
const long long INFL = LLONG_MAX;
const long double pi = acos(-1);
long long N;
int main() {
  ios_base::sync_with_stdio(0);
  cout.precision(15);
  cout << fixed;
  cout.tie(0);
  cin.tie(0);
  cin >> N;
  long long mn = INFL;
  long long mx = -1;
  for (long long a = 1; a * a * a <= N; a++) {
    if (N % a != 0) continue;
    long long Na = N / a;
    for (long long b = a; b * b <= Na; b++) {
      if (Na % b != 0) continue;
      long long c = Na / b;
      long long cur;
      cur = (a + 1) * (b + 2) * (c + 2);
      mn = min(mn, cur);
      mx = max(mx, cur);
      cur = (a + 2) * (b + 1) * (c + 2);
      mn = min(mn, cur);
      mx = max(mx, cur);
      cur = (a + 2) * (b + 2) * (c + 1);
      mn = min(mn, cur);
      mx = max(mx, cur);
    }
  }
  cout << mn - N << ' ' << mx - N << '\n';
}
