#include <bits/stdc++.h>
using namespace std;
const int MAXN = 65536;
bool is_prime[MAXN];
void get_prime() {
  for (int i = 4; i < MAXN; i += 2) is_prime[i] = true;
  is_prime[0] = is_prime[1] = true;
  int cnt = sqrt((double)MAXN);
  for (int i = 3; i < cnt; i += 2)
    if (!is_prime[i])
      for (int j = i * i; j < MAXN; j += i) is_prime[j] = true;
}
vector<int> primes;
void _get_prime() {
  primes.push_back(2);
  for (int i = 3; i < MAXN; i += 2)
    if (!is_prime[i]) primes.push_back(i);
}
vector<int> factors;
long long minl, maxl;
long long n, m;
void slove(int a) {
  long long v = n / a;
  long long l = sqrt(v * 1.0) + 1;
  for (long long i = l; i >= 1; --i) {
    if (v % i == 0) {
      long long lv = (i + 2) * (a + 1) * (v / i + 2) - n;
      maxl = max(maxl, lv);
      minl = min(minl, lv);
    }
  }
}
int main() {
  get_prime();
  _get_prime();
  cin >> n;
  m = sqrt(n * 1.0) + 1;
  minl = (1LL << 60);
  maxl = 0;
  for (int i = 1; i <= m; ++i) {
    if (n % i == 0) {
      factors.push_back(i);
      factors.push_back(n / i);
    }
  }
  sort(factors.begin(), factors.end());
  for (int i = 0; i < factors.size(); ++i) {
    slove(factors[i]);
  }
  cout << minl << ' ' << maxl << endl;
  return 0;
}
