#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  while (cin >> n) {
    long long pos = sqrt((double)n);
    long long Min = -1;
    long long Max = 0;
    for (long long i = 1; i <= pos; i++) {
      if (n % i == 0) {
        long long ab = n / i;
        long long tempMax = (i + 1) * (1 + 2) * (ab + 2);
        Max = max(tempMax, Max);
        long long sq = sqrt((double)ab);
        if (sq * sq == ab) {
          long long tempMin = (i + 1) * (sq + 2) * (sq + 2);
          if (Min == -1)
            Min = tempMin;
          else
            Min = min(tempMin, Min);
        } else {
          long long num;
          for (long long j = sq; j >= 1; j--) {
            if (ab % j == 0) {
              num = j;
              break;
            }
          }
          long long tempMin = (i + 1) * (num + 2) * (ab / num + 2);
          if (Min == -1)
            Min = tempMin;
          else
            Min = min(tempMin, Min);
        }
      }
    }
    Min = min(Min, (n + 1) * 3 * 3);
    Max = max(Max, (n + 1) * 3 * 3);
    cout << Min - n << " " << Max - n << endl;
  }
  return 0;
}
