#include <bits/stdc++.h>
using namespace std;
int gcd(int x, int y) { return y == 0 ? x : gcd(y, x % y); }
int toInt(char xx) { return xx - '0'; }
char toChar(int xx) { return xx + '0'; }
bool isNum(char xx) { return ('0' <= xx && xx <= '9'); }
long long n;
vector<long long> uc;
void read() { cin >> n; }
void init() {
  for (long long i = 1; i * i <= n; ++i) {
    if (n % i == 0) {
      uc.push_back(i);
      if (i * i != n) {
        uc.push_back(n / i);
      }
    }
  }
}
void solve() {
  int siz = uc.size();
  long long resmax = -1;
  long long resmin = -1;
  for (int i = 0; i < siz; ++i) {
    for (int j = 0; j < siz; ++j) {
      long long y = uc[i];
      long long z = uc[j];
      if (n % (y * z) == 0) {
        long long restmp = (1 + n / (y * z)) * (y + 2) * (z + 2);
        if (resmax == -1 && resmin == -1) {
          resmax = restmp;
          resmin = restmp;
        } else if (restmp > n) {
          resmax = max(restmp, resmax);
          resmin = min(restmp, resmin);
        }
      }
    }
  }
  cout << resmin - n << " " << resmax - n;
}
int main() {
  read();
  init();
  solve();
}
