#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  scanf("%d", &N);
  long long res1;
  long long res2;
  long long n = N;
  res1 = (n + 1LL) * 3LL * 3LL;
  res2 = res1;
  for (long long i = 1LL; i * i * i <= n; i++) {
    if (n % i == 0LL) {
      long long n2 = n / i;
      for (long long j = 1LL; j * j <= n2; j++) {
        if (n2 % j == 0LL) {
          long long k = n2 / j;
          if (k == 0LL) {
            continue;
          }
          long long temp = (i + 2LL) * (j + 2LL) * (k + 1LL);
          if (temp < res2) {
            res2 = temp;
          }
          if (temp > res1) {
            res1 = temp;
          }
          temp = (i + 2LL) * (j + 1LL) * (k + 2LL);
          if (temp < res2) {
            res2 = temp;
          }
          if (temp > res1) {
            res1 = temp;
          }
          temp = (i + 1LL) * (j + 2LL) * (k + 2LL);
          if (temp < res2) {
            res2 = temp;
          }
          if (temp > res1) {
            res1 = temp;
          }
        }
      }
    }
  }
  res2 -= n;
  res1 -= n;
  printf("%I64d %I64d\n", res2, res1);
  return 0;
}
