#include <bits/stdc++.h>
using namespace std;
int cmpint(const void *a, const void *b) {
  if (((int *)a)[0] == ((int *)b)[0]) return ((int *)a)[1] - ((int *)b)[1];
  return ((int *)a)[0] - ((int *)b)[0];
}
int prim[500005] = {0};
bool isprim[5000005] = {0};
int prim_len;
void count_prim() {
  int i, j, l;
  prim[0] = 2;
  prim_len = 1;
  for (i = 3; i < 5000000; i += 2)
    if (isprim[i] == 0) {
      prim[prim_len] = i;
      prim_len++;
      l = i * 2;
      if (i < 10000)
        for (j = i * i; j < 5000000; j += l) isprim[j] = 1;
    }
}
int a[100005][3];
char s[100005];
int main() {
  long long i, j, n, m, k, l, o, p;
  count_prim();
  cin >> n;
  long long min = 1000000, max = 0;
  long long te;
  min *= 10000000;
  for (i = (1); i < (1001); i++)
    if (n % i == 0) {
      k = n / i;
      for (j = (i); j < (sqrt(k) + 1); j++)
        if (k % j == 0) {
          l = k / j;
          te = (i + 2) * (j + 2) * (l + 1);
          if (te > max) max = te;
          if (te < min) min = te;
          te = (i + 1) * (j + 2) * (l + 2);
          if (te > max) max = te;
          if (te < min) min = te;
          te = (i + 2) * (j + 1) * (l + 2);
          if (te > max) max = te;
          if (te < min) min = te;
        }
    }
  cout << min - n << " " << max - n << endl;
  return 0;
}
