#include <bits/stdc++.h>
using namespace std;
long long x, y, ans = 1, i, n, v, t, ans1 = 1000000000000000, ans2, j;
vector<int> a;
int main() {
  cin >> n;
  long long n1 = n, t1 = t;
  for (i = 1; i <= (int)sqrt((double)n); i++) {
    if (n % i == 0) {
      n1 /= i;
      t = n / i;
      for (j = 1; j <= (int)sqrt((double)t); j++)
        if (t % j == 0) {
          t1 = t / j;
          x = t / j;
          if (x * i * j != n) continue;
          if ((i + 1) * (j + 2) * (x + 2) < ans1)
            ans1 = (i + 1) * (j + 2) * (x + 2);
          if ((j + 1) * (i + 2) * (x + 2) < ans1)
            ans1 = (j + 1) * (i + 2) * (x + 2);
          if ((x + 1) * (j + 2) * (i + 2) < ans1)
            ans1 = (x + 1) * (j + 2) * (i + 2);
          if ((i + 1) * (j + 2) * (x + 2) > ans2)
            ans2 = (i + 1) * (j + 2) * (x + 2);
          if ((j + 1) * (i + 2) * (x + 2) > ans2)
            ans2 = (j + 1) * (i + 2) * (x + 2);
          if ((x + 1) * (j + 2) * (i + 2) > ans2)
            ans2 = (x + 1) * (j + 2) * (i + 2);
        }
    }
  }
  cout << ans1 - n << " " << ans2 - n;
  return 0;
}
