#include <bits/stdc++.h>
using namespace std;
const long long int N = 1e6, mod = 1e9 + 7, inf = 1e10;
long long int a[N], dp[N];
int main() {
  long long int n, mn = 0, mx = -1, ans_1 = 0, ans_2 = 0, cnt, clk, clr;
  cin >> n;
  for (long long int i = 1; i * i * i <= n; i++) {
    if (n % i == 0) {
      for (long long int j = 1; j * j <= (n / i); j++) {
        long long int k = n / (i * j);
        if (i * j * k == n) {
          cnt = (i + 1) * (j + 2) * (k + 2);
          if (mn == 0) mn = cnt;
          mn = min(mn, cnt);
          mx = max(mx, cnt);
          clk = (i + 2) * (j + 1) * (k + 2);
          mn = min(mn, clk);
          mx = max(mx, clk);
          clr = (i + 2) * (j + 2) * (k + 1);
          mn = min(mn, clr);
          mx = max(mx, clr);
        }
      }
    }
  }
  ans_1 = mn - n;
  ans_2 = mx - n;
  cout << ans_1 << " ";
  return cout << (ans_2), 0;
}
