#include <bits/stdc++.h>
using namespace std;
const int EPS = 1e-6;
const long long INF = 1e15;
const long long mod = (int)(1e+9 + 7);
const int N = (int)(0);
int r3(int n) {
  int i = 1;
  for (; i * i * i <= n; i++)
    ;
  return i - 1;
}
int main() {
  int n;
  cin >> n;
  long long M = 0, m = INF;
  int a[3];
  for (a[0] = 1; (a[0]) * (a[0]) * (a[0]) <= n; a[0]++) {
    if (n % a[0] != 0) continue;
    for (a[1] = 1; (a[1]) * (a[1]) <= n / a[0]; a[1]++) {
      if ((n / a[0]) % a[1] != 0) continue;
      a[2] = (n / a[0]) / a[1];
      for (int i = 0; i < 3; i++) {
        M = max(M,
                1LL * (a[i] + 1) * (a[(i + 1) % 3] + 2) * (a[(i + 2) % 3] + 2));
        m = min(m,
                1LL * (a[i] + 1) * (a[(i + 1) % 3] + 2) * (a[(i + 2) % 3] + 2));
      }
    }
  }
  cout << m - n << " " << M - n;
  return 0;
}
