#include <bits/stdc++.h>
using namespace std;
int mark[100000];
long long prime[10000], k, mn, mx, N;
vector<pair<long long, long long> > a;
void sieve() {
  for (long long i = 2; i < 1000; i++)
    if (!mark[i])
      for (long long j = i * i; j < 100000; j += i) mark[j] = 1;
  prime[k++] = 2;
  for (long long i = 3; i < 100000; i += 2)
    if (!mark[i]) prime[k++] = i;
}
long long power(long long a, long long b) {
  long long ret = 1;
  while (b--) ret *= a;
  return ret;
}
void f(int pos, long long A, long long B, long long C) {
  if (pos == a.size()) {
    mn = min(mn, (A + 1) * (B + 2) * (C + 2));
    mx = max(mx, (A + 1) * (B + 2) * (C + 2));
    return;
  }
  for (int i = 0; i <= a[pos].second; i++)
    for (int j = 0; i + j <= a[pos].second; j++)
      f(pos + 1, A * power(a[pos].first, i), B * power(a[pos].first, j),
        C * power(a[pos].first, a[pos].second - i - j));
}
int main() {
  sieve();
  long long n;
  cin >> n;
  N = n;
  for (long long i = 0; i < k && prime[i] * prime[i] <= n; i++) {
    long long cc = 0, p = 1;
    while (n % prime[i] == 0) {
      p = prime[i], cc++;
      n /= p;
    }
    if (cc) a.push_back(pair<long long, long long>(p, cc));
  }
  if (n > 1) a.push_back(pair<long long, long long>(n, 1));
  mx = 0;
  mn = (1LL << 60);
  f(0, 1, 1, 1);
  cout << mn - N << " " << mx - N << endl;
  return 0;
}
