#include <bits/stdc++.h>
using namespace std;
long long int mx = 0;
int n;
long long int mi = 200000000000000;
void divide(int num, int c) {
  int rn = sqrt(num);
  for (int i = 1; i <= rn; i++) {
    if (num % i == 0) {
      long long int a = i;
      long long int b = num / i;
      a += 1;
      b += 2;
      long long int temp = a * b * c;
      mx = max(mx, temp - n);
      mi = min(mi, temp - n);
      a = num / i;
      b = i;
      a += 1;
      b += 2;
      temp = a * b * c;
      mx = max(mx, temp - n);
      mi = min(mi, temp - n);
    }
  }
}
int main() {
  cin >> n;
  int rng = sqrt(n);
  for (int i = 1; i <= rng; i++) {
    if (n % i == 0) {
      int f1 = i;
      int f2 = n / i;
      int c = f1 + 2;
      divide(f2, c);
      c = f2 + 2;
      divide(f1, c);
    }
  }
  cout << mi << " " << mx << endl;
  return 0;
}
