#include <bits/stdc++.h>
using namespace std;
const unsigned long long int INF = LLONG_MAX;
vector<unsigned long long int> v1, v2;
string s1, s2, s3, s4, s5;
void fun() {
  unsigned long long int i, j, k;
  for (i = 0; i < 3; i++) {
    for (j = 0; j < 3; j++) {
      for (k = 0; k < 3; k++) {
        if (i != j && i != k && j != k) {
          unsigned long long int x = v1[i] + 1;
          unsigned long long int y = v1[j] + 2;
          unsigned long long int z = v1[k] + 2;
          v2.push_back(x * y * z);
        }
      }
    }
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  unsigned long long int a, b, c, d, e, f, i = 0, j, k, l, cnt1 = 0, cnt2 = 0,
                                           sum1 = 0, sum2 = 0, chk1 = 0,
                                           chk2 = 0, T;
  cin >> a;
  unsigned long long int x = sqrt(a + 1);
  for (i = 1; i <= x; i++) {
    if (a % i == 0) {
      v1.clear();
      unsigned long long int p = i;
      unsigned long long int q = a / i;
      unsigned long long int y = sqrt(p + 1);
      for (j = 1; j <= y; j++) {
        if (p % j == 0) {
          v1.clear();
          v1.push_back(j);
          v1.push_back(p / j);
          v1.push_back(q);
          fun();
        }
      }
      y = sqrt(q + 1);
      for (j = 1; j <= y; j++) {
        if (q % j == 0) {
          v1.clear();
          v1.push_back(j);
          v1.push_back(q / j);
          v1.push_back(p);
          fun();
        }
      }
    }
  }
  cout << *min_element(v2.begin(), v2.end()) - a << " "
       << *max_element(v2.begin(), v2.end()) - a;
  return 0;
}
