#include <bits/stdc++.h>
using namespace std;
int n, d[100000], tot = 0;
long long ans1 = 0, ans2 = 0;
void calc(int a, int b, int c) {
  long long tq = (long long)a * b * c;
  ans1 = (ans1 == 0) ? tq : min(ans1, tq);
  ans2 = (ans2 == 0) ? tq : max(ans2, tq);
}
int main() {
  int i, j, t;
  cin >> n;
  for (i = 1; i * i <= n; i++) {
    if (n % i == 0) {
      d[++tot] = i;
      if (i * i < n) d[++tot] = n / i;
    }
  }
  for (i = 1; i <= tot; i++) {
    for (j = 1; j <= tot; j++)
      if ((long long)d[i] * d[j] <= (long long)n &&
          n % ((long long)d[i] * d[j]) == 0) {
        t = n / d[i] / d[j];
        calc(d[i] + 1, d[j] + 2, t + 2);
        calc(d[i] + 2, d[j] + 1, t + 2);
        calc(d[i] + 2, d[j] + 2, t + 1);
      }
  }
  cout << ans1 - n << " " << ans2 - n;
}
