#include <bits/stdc++.h>   using namespace std;   long long int min_answer;   long long int max_answer = -1;   void test_this_order(long long int a, long long int b, long long int c) {     long long int new_n = (a + 1) * (b + 2) * (c + 2) - a * b * c;     min_answer = std::min(min_answer, new_n);     max_answer = std::max(max_answer, new_n);   }   void test(long long int a, long long int b, long long int c) {     test_this_order(a, b, c);     test_this_order(b, a, c);     test_this_order(c, b, a);   }   int main() {     long long int n;     cin >> n;     test(n, 1, 1);     min_answer = max_answer;     for (long long int i = 1; i * i <= n; ++i) {       if (n % i == 0) {         long long new_n = n / i;         for (long long int j = 1; j * j <= new_n; ++j) {           if (new_n % j == 0) {             test(i, j, new_n / j);           }         }       }     }     cout << min_answer <<     << max_answer << endl;     return 0;   }   