#include <bits/stdc++.h>
using namespace std;
long long ans_min = 1000000000;
long long ans_max = 0;
void check(long long a, long long b, long long c) {
  long long t = (a + 1) * (b + 2) * (c + 2) - a * b * c;
  if (t < ans_min) ans_min = t;
  if (t > ans_max) ans_max = t;
}
int main() {
  ans_min *= 1000000000;
  int n;
  cin >> n;
  int i;
  int a, b, c, n0;
  for (i = 1; i * i <= n; i++) {
    if (n % i != 0) continue;
    a = i;
    n0 = n / i;
    int j;
    for (j = 1; j * j <= n0; j++) {
      if (n0 % j != 0) continue;
      b = j;
      c = n0 / j;
      check(a, b, c);
    }
    a = n / i;
    n0 = i;
    for (j = 1; j * j <= n0; j++) {
      if (n0 % j != 0) continue;
      b = j;
      c = n0 / j;
      check(a, b, c);
    }
  }
  cout << ans_min << ' ' << ans_max << endl;
  return 0;
}
