#include <bits/stdc++.h>
using namespace std;
int n;
long long mn = 1000000000000000000ll, mx = -1;
void check(int i) {
  long long ans = (long long)(i + 1);
  int m = (n / i);
  mx = max(ans * (long long)(m + 2) * 3ll, mx);
  int j = sqrt(m) + 1;
  while (j > 0 && (m % j != 0)) j--;
  mn = min(ans * (long long)(j + 2) * (long long)(m / j + 2), mn);
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= sqrt(n); i++) {
    if (n % i != 0) continue;
    check(i);
    check(n / i);
  }
  cout << mn - (long long)n << ' ' << mx - (long long)n << endl;
}
