#include <bits/stdc++.h>
using namespace std;
long long n;
long long maxx;
long long minn;
void tryall(long long a, long long b, long long c) {
  long long x = (a + 1) * (b + 2) * (c + 2);
  maxx = max(maxx, (x - n));
  minn = min(minn, (x - n));
  swap(a, b);
  x = (a + 1) * (b + 2) * (c + 2);
  maxx = max(maxx, (x - n));
  minn = min(minn, (x - n));
  swap(a, b);
  swap(a, c);
  x = (a + 1) * (b + 2) * (c + 2);
  maxx = max(maxx, (x - n));
  minn = min(minn, (x - n));
}
void fac2(long long a, long long x) {
  long long b, c;
  for (long long i = 1; i * i <= x; i++) {
    if (x % i == 0) {
      b = i;
      c = x / i;
      tryall(a, b, c);
    }
  }
}
void fac3() {
  for (long long i = 1; i * i * i <= n; i++) {
    if (n % i == 0) {
      fac2(i, n / i);
    }
  }
}
int main() {
  cin >> n;
  maxx = -1 * 1e16;
  minn = 1e16;
  fac3();
  cout << minn << " " << maxx << endl;
  return 0;
}
