#include <bits/stdc++.h>
using namespace std;
long long a, b, c[1234567], dp[1005][1005], d[1234567], e, n, j, i, l, r, x, y,
    k, ans, sz;
bool used[52345670];
long long T;
char ch[1234][1234];
vector<long long> v[1234567], v1, vv;
string s, s1[1234567];
priority_queue<long long> pq;
long long sum;
map<long long, long long> ma, m;
long long ar[1234567];
long long mod = 998244353;
long long fac[1234567];
set<long long> se[123456];
int main() {
  cin >> n;
  long long mx = 0, mn = 1e18;
  for (int i = 1; i * i * i <= n; i++) {
    for (int j = 1; j * j * i <= n; j++) {
      if (n % (i * j) == 0) {
        long long a = i;
        long long b = j;
        long long c = n / (i * j);
        mx = max(mx, (a + 1) * (b + 2) * (c + 2));
        mx = max(mx, (b + 1) * (a + 2) * (c + 2));
        mx = max(mx, (c + 1) * (a + 2) * (b + 2));
        mn = min(mn, (a + 1) * (b + 2) * (c + 2));
        mn = min(mn, (b + 1) * (a + 2) * (c + 2));
        mn = min(mn, (c + 1) * (a + 2) * (b + 2));
      }
    }
  }
  cout << mn - n << " " << mx - n;
}
