#include <bits/stdc++.h>
using namespace std;
const long long INF = 1 << 60;
long long ansMin = INF, ansMax = -INF;
bool shit1 = false, shit2 = false;
vector<long long> divisors;
vector<long long> temp(3);
void defineDivisrors(int N) {
  for (int i = 1; i * i <= N; i++) {
    if (N % i == 0) {
      divisors.push_back(i);
      if (i * i != N) {
        divisors.push_back(N / i);
      }
    }
  }
  sort(divisors.begin(), divisors.end());
}
void sol(long long cur) {
  for (int i = 0; i < divisors.size(); i++) {
    for (int j = 0; j < divisors.size(); j++) {
      if (((cur / divisors[i]) / divisors[j]) * divisors[i] * divisors[j] ==
          cur) {
        long long w = (cur / divisors[i]) / divisors[j];
        long long temp = w * divisors[j] * 2 + divisors[i] * w * 2 +
                         divisors[j] * divisors[i] + 4 + 4 * w +
                         2 * divisors[j] + 2 * divisors[i];
        cerr << divisors[i] << ' ' << divisors[j] << ' ' << w << ' ' << temp
             << '\n';
        if (temp != 0 && (!shit1 || ansMin > temp)) {
          ansMin = temp;
          shit1 = true;
        }
        if (!shit2 || ansMax < temp) {
          ansMax = temp;
          shit2 = true;
        }
      }
    }
  }
}
int main() {
  cin.sync_with_stdio(false);
  cout.sync_with_stdio(false);
  long long n;
  cin >> n;
  defineDivisrors(n);
  sol(n);
  cout << ansMin << ' ' << ansMax;
  return 0;
}
