#include <bits/stdc++.h>
using namespace std;
int main() {
  long long minans = 1e+15, maxans = 0;
  int n;
  scanf("%d", &n);
  for (int i = 1; i * i <= n; i++) {
    if (n % i != 0) continue;
    int a = n / i;
    for (int j = 1; j * j <= a; j++) {
      if (a % j != 0) continue;
      int b = j, c = a / j;
      long long num = ((long long)(i + 1)) * (b + 2) * (c + 2) - n;
      if (num < minans) minans = num;
      if (num > maxans) maxans = num;
      num = ((long long)(i + 2)) * (b + 1) * (c + 2) - n;
      if (num < minans) minans = num;
      if (num > maxans) maxans = num;
      num = ((long long)(i + 2)) * (b + 2) * (c + 1) - n;
      if (num < minans) minans = num;
      if (num > maxans) maxans = num;
    }
  }
  printf("%lld %lld\n", minans, maxans);
  return 0;
}
