#include <bits/stdc++.h>
using namespace std;
const double PI = 4 * atan(1.0);
void fast_stream() { std::ios_base::sync_with_stdio(0); }
const long long INF = 1000000000000LL;
long long minN = INF;
long long maxN = -INF;
void update(int a, int b, int c) {
  minN = min(minN, (long long)(a + 1) * (b + 2) * (c + 2));
  minN = min(minN, (long long)(b + 1) * (a + 2) * (c + 2));
  minN = min(minN, (long long)(c + 1) * (b + 2) * (a + 2));
  maxN = max(maxN, (long long)(a + 1) * (b + 2) * (c + 2));
  maxN = max(maxN, (long long)(b + 1) * (a + 2) * (c + 2));
  maxN = max(maxN, (long long)(c + 1) * (b + 2) * (a + 2));
}
void solve() {
  int n;
  cin >> n;
  for (int i = 1; i * i <= n; i++) {
    if (n % i != 0) continue;
    for (int j = 1; j * j <= (n / i); j++) {
      if ((n / i) % j != 0) continue;
      update(i, j, (n / i) / j);
    }
    for (int j = 1; j * j <= i; j++) {
      if (i % j != 0) continue;
      update(n / i, j, i / j);
    }
  }
  cout << minN - n << " " << maxN - n << endl;
}
int main() {
  solve();
  return 0;
}
