#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  long long n;
  cin >> n;
  long long mn;
  for (long long a = 1; a * a <= n; a++) {
    if (n % a == 0)
      for (long long b = a; b * b <= n / a; b++) {
        if (n / a % b == 0) {
          mn = min(mn, (a + 1) * (b + 2) * (n / (a * b) + 2) - n);
        }
      }
  }
  cout << mn << " " << (n + 1) * 9 - n << endl;
}
