#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  long long r1 = sqrtl(n);
  long long m = (1LL << 60);
  long long M = -1;
  for (long long b = 1; b <= r1; ++b) {
    if (n % b) continue;
    long long B = b;
    long long n1 = n / b;
    long long r2 = sqrtl(n1);
    for (long long c = 1; c <= r2; ++c) {
      if (n1 % c) continue;
      long long C = c;
      long long A = n1 / c;
      if (A * B * C == n) {
        long long d = 2 * A * C + 2 * A * B + 4 * A + B * C + 2 * C + 2 * B + 4;
        m = min(m, d);
        M = max(M, d);
      }
      C = n1 / c;
      A = c;
      if (A * B * C == n) {
        long long d = 2 * A * C + 2 * A * B + 4 * A + B * C + 2 * C + 2 * B + 4;
        m = min(m, d);
        M = max(M, d);
      }
    }
    B = n / b;
    n1 = b;
    r2 = sqrt(n1);
    for (long long c = 1; c <= r2; ++c) {
      if (n1 % c) continue;
      long long C = c;
      long long A = n1 / c;
      if (A * B * C == n) {
        long long d = 2 * A * C + 2 * A * B + 4 * A + B * C + 2 * C + 2 * B + 4;
        m = min(m, d);
        M = max(M, d);
      }
      C = n1 / c;
      A = c;
      if (A * B * C == n) {
        long long d = 2 * A * C + 2 * A * B + 4 * A + B * C + 2 * C + 2 * B + 4;
        m = min(m, d);
        M = max(M, d);
      }
    }
  }
  cout << m << ' ' << M << endl;
  return 0;
}
