#include <bits/stdc++.h>
using namespace std;
void solve(unsigned long long n) {
  unsigned long long _min = 1000000000000000000;
  unsigned long long _max = 0;
  for (unsigned long long Amin1 = 1; Amin1 * Amin1 <= n; Amin1++) {
    if (n % Amin1 == 0) {
      unsigned long long A = Amin1 + 1;
      unsigned long long prod = n / Amin1;
      for (unsigned long long Bmin2 = 1; Bmin2 * Bmin2 <= prod; Bmin2++) {
        if (prod % Bmin2 == 0) {
          unsigned long long B = Bmin2 + 2;
          unsigned long long Cmin2 = prod / Bmin2;
          unsigned long long C = Cmin2 + 2;
          unsigned long long current = A * B * C - n;
          if (current < _min) _min = current;
          if (current > _max) _max = current;
        }
      }
      prod = Amin1;
      A = n / Amin1 + 1;
      for (unsigned long long Bmin2 = 1; Bmin2 * Bmin2 <= prod; Bmin2++) {
        if (prod % Bmin2 == 0) {
          unsigned long long B = Bmin2 + 2;
          unsigned long long Cmin2 = prod / Bmin2;
          unsigned long long C = Cmin2 + 2;
          unsigned long long current = A * B * C - n;
          if (current < _min) _min = current;
          if (current > _max) _max = current;
        }
      }
    }
  }
  cout << _min << ' ' << _max;
}
int main() {
  unsigned long long n;
  cin >> n;
  solve(n);
  return 0;
}
