#include <bits/stdc++.h>
using namespace std;
long long n, mi, ma;
const long long inf = 1000000000;
int main() {
  cin >> n;
  mi = inf;
  ma = -inf;
  mi *= inf;
  ma *= inf;
  long long x, y, z, a, b, c, v;
  for (x = 1; x < (int)(pow(n, 1.0 / 3)) + 1; x++)
    if (n % x == 0) {
      long long m = n / x;
      for (int y = x; y < (int)sqrt(m * 1.0) + 1; y++)
        if (m % y == 0) {
          z = m / y;
          a = x + 1;
          b = y + 2;
          c = z + 2;
          v = a * b * c;
          mi = min(mi, v - n);
          ma = max(ma, v - n);
        }
    }
  for (y = 1; y < (int)(pow(n, 1.0 / 3)) + 1; y++)
    if (n % y == 0) {
      long long m = n / y;
      for (int x = y; x < (int)sqrt(m * 1.0) + 1; x++)
        if (m % x == 0) {
          z = m / x;
          a = x + 1;
          b = y + 2;
          c = z + 2;
          v = a * b * c;
          mi = min(mi, v - n);
          ma = max(ma, v - n);
        }
    }
  for (y = 1; y < (int)(pow(n, 1.0 / 3)) + 1; y++)
    if (n % y == 0) {
      long long m = n / y;
      for (int z = y; z < (int)sqrt(m * 1.0) + 1; z++)
        if (m % z == 0) {
          x = m / z;
          a = x + 1;
          b = y + 2;
          c = z + 2;
          v = a * b * c;
          mi = min(mi, v - n);
          ma = max(ma, v - n);
        }
    }
  cout << mi << ' ' << ma;
}
