#include <bits/stdc++.h>
using namespace std;
int n, m, cop;
int f[110], p[110];
long long vmin = 1000000000000000000LL, vmax = 0;
void back(int a, int b, int pos, int nr) {
  if (pos > m) {
    int c = n / (a * b);
    a = a + 1;
    b = b + 2;
    c = c + 2;
    long long prod = 1LL * a * b * c;
    vmin = min(vmin, prod - n);
    vmax = max(vmax, prod - n);
    return;
  }
  if (nr == 0)
    back(a, b, pos + 1, p[pos + 1]);
  else {
    for (int i = 0; i <= nr; i++)
      for (int j = 0; j <= nr - i; j++) {
        int newa = a, newb = b;
        for (int k = 1; k <= i; k++) newa *= f[pos];
        for (int k = 1; k <= j; k++) newb *= f[pos];
        back(newa, newb, pos + 1, p[pos + 1]);
      }
  }
}
int main() {
  scanf("%d", &n);
  cop = n;
  for (int i = 2; i * i <= n; i++)
    if (n % i == 0) {
      f[++m] = i;
      while (n % i == 0) {
        n /= i;
        p[m]++;
      }
    }
  if (n > 1) {
    f[++m] = n;
    p[m] = 1;
  }
  n = cop;
  back(1, 1, 1, p[1]);
  cout << vmin << " " << vmax << "\n";
  return 0;
}
