#include <bits/stdc++.h>
using namespace std;
long long answer1, answer2;
int p, n, i;
void goo(long long x, long long y, long long z) {
  answer2 = max(answer2, (x + 1) * (y + 2) * (z + 2));
  answer2 = max(answer2, (x + 2) * (y + 2) * (z + 1));
  answer2 = max(answer2, (x + 2) * (y + 1) * (z + 1));
  if (answer1 == 0)
    answer1 = (x + 1) * (y + 2) * (z + 2);
  else
    answer1 = min(answer1, (x + 1) * (y + 2) * (z + 2));
  if (answer1 == 0)
    answer1 = (x + 2) * (y + 1) * (z + 2);
  else
    answer1 = min(answer1, (x + 2) * (y + 1) * (z + 2));
  if (answer1 == 0)
    answer1 = (x + 2) * (y + 2) * (z + 1);
  else
    answer1 = min(answer1, (x + 2) * (y + 2) * (z + 1));
}
void go(long long a, long long b) {
  int q = (int)sqrt(a);
  for (int j = 1; j <= q; j++)
    if (a % j == 0) goo(j, a / j, b);
}
int main() {
  cin >> n;
  p = (int)sqrt(n);
  for (i = 1; i <= p; i++)
    if (n % i == 0) {
      go(i, n / i);
      go(n / i, i);
    }
  cout << answer1 - n << " " << answer2 - n << endl;
}
