#include <bits/stdc++.h>
using namespace std;
long long int gcd(long long int a, long long int b) {
  if (a < b) {
    a = a + b;
    b = a - b;
    a = a - b;
  }
  while (b != 0) {
    long long int r = a % b;
    a = b;
    b = r;
  }
  return a;
}
long long int bs(long long int arr[], long long int l, long long int r,
                 long long int x) {
  if (r >= l) {
    long long int mid = l + (r - l) / 2;
    if (arr[mid] == x) return mid;
    if (arr[mid] > x) return bs(arr, l, mid - 1, x);
    return bs(arr, mid + 1, r, x);
  }
  return -1;
}
long long int mypower(long long int x, long long int n) {
  if (n == 0) return 1;
  if (n & 1)
    return (((x * mypower(x, n / 2)) % 1000000007) *
            (mypower(x, n / 2) % 1000000007) % 1000000007);
  return (((mypower(x, n / 2)) % 1000000007) *
          (mypower(x, n / 2) % 1000000007)) %
         1000000007;
}
unsigned base[46656 / 64], segment[100032 / 64], primes[4830];
void sieve() {
  unsigned i, j, k;
  for (i = 3; i < 216; i += 2)
    if (!(base[i >> 6] & (1 << ((i >> 1) & 31))))
      for (j = i * i, k = i << 1; j < 46656; j += k)
        (base[j >> 6] |= (1 << ((j >> 1) & 31)));
  primes[0] = 2;
  for (i = 3, j = 1; i < 46656; i += 2)
    if (!(base[i >> 6] & (1 << ((i >> 1) & 31)))) primes[j++] = i;
}
vector<pair<long long int, long long int> > factors;
void primeFactors(long long int num) {
  long long int expo = 0;
  for (long long int i = 0; primes[i] <= sqrt(num); i++) {
    expo = 0;
    long long int prime = primes[i];
    while (num % prime == 0) {
      expo++;
      num = num / prime;
    }
    if (expo > 0) factors.push_back(make_pair(prime, expo));
  }
  if (num >= 2) factors.push_back(make_pair(num, 1));
}
vector<long long int> divisors;
void setDivisors(long long int n, long long int i) {
  long long int j, x, k;
  for (j = i; j < factors.size(); j++) {
    x = factors[j].first * n;
    for (k = 0; k < factors[j].second; k++) {
      divisors.push_back(x);
      setDivisors(x, j + 1);
      x *= factors[j].first;
    }
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  sieve();
  long long int n;
  cin >> n;
  primeFactors(n);
  setDivisors(1, 0);
  divisors.push_back(1);
  sort(divisors.begin(), divisors.end());
  long long int maxi = 3 * 3 * (n + 1);
  long long int mini = 1000000000000000000;
  for (int i = 0; i < divisors.size(); i++) {
    for (int j = 0; j < divisors.size(); j++) {
      if (divisors[i] * divisors[j] <= n &&
          n % (divisors[i] * divisors[j]) == 0) {
        long long int k = n / (divisors[i] * divisors[j]);
        long long int x = (divisors[i] + 1) * (divisors[j] + 2) * (k + 2);
        if (x < mini) mini = x;
      }
    }
  }
  cout << mini - n << " " << maxi - n;
  divisors.clear();
  factors.clear();
  return 0;
}
