#include <bits/stdc++.h>
using namespace std;
const long long INF = 1000000000000ll;
long long n;
int main() {
  cin >> n;
  long long i = 1;
  long long mn = INF, mx = 0;
  while (i * i <= n) {
    if (n % i == 0) {
      long long nn = n / i, j = 1;
      while (j * j <= nn) {
        if (nn % j == 0) {
          long long cur = (i + 1) * (j + 2) * (nn / j + 2) - n;
          mn = min(mn, cur);
          mx = max(mx, cur);
        }
        j++;
      }
      nn = i;
      j = 1;
      while (j * j <= nn) {
        if (nn % j == 0) {
          long long cur = (n / i + 1) * (j + 2) * (nn / j + 2) - n;
          mn = min(mn, cur);
          mx = max(mx, cur);
        }
        j++;
      }
    }
    i++;
  }
  cout << mn << ' ' << mx << endl;
}
