#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1);
long long n, N;
long long Max = 0, Min = 1E19;
void update(int x, int y, int z) {
  N = (long long)(x + 1) * (y + 2) * (z + 2);
  Min = min(Min, N - n);
  Max = max(Max, N - n);
  return;
}
int main(int argc, char *argv[]) {
  scanf("%I64d", &n);
  int k = (int)sqrt(n);
  for (int i = 1; i <= k; i++)
    if (n % i == 0) {
      int p = n / i;
      int q = (int)sqrt(p);
      for (int j = 1; j <= q; j++)
        if (p % j == 0) {
          update(i, j, p / j);
          update(i, p / j, j);
          update(j, i, p / j);
          update(j, p / j, i);
          update(p / j, i, j);
          update(p / j, j, i);
          N = (long long)(i + 1) * (j + 2) * (p / j + 2);
          Min = min(Min, N - n);
          Max = max(Max, N - n);
        }
    }
  printf("%I64d %I64d\n", Min, Max);
  return 0;
}
