#include <bits/stdc++.h>
using namespace std;
char s[200005];
int main() {
  long long a, b, n, mn = 0x3f3f3f3f3f3f3f3f, mx = -1;
  cin >> n;
  for (a = 1; a * a * a <= n; a++)
    for (b = a; a * b * b <= n; b++) {
      if (n % (a * b) == 0) {
        mn = min(mn, (a + 1) * (b + 2) * (n / (a * b) + 2) - n);
        mx = max(mx, (a + 1) * (b + 2) * (n / (a * b) + 2) - n);
        mn = min(mn, (a + 2) * (b + 2) * (n / (a * b) + 1) - n);
        mx = max(mx, (a + 2) * (b + 2) * (n / (a * b) + 1) - n);
        mn = min(mn, (a + 2) * (b + 1) * (n / (a * b) + 2) - n);
        mx = max(mx, (a + 2) * (b + 1) * (n / (a * b) + 2) - n);
      }
    }
  cout << mn << " " << mx << endl;
  return 0;
}
