#include <iostream>
#include <vector>
using namespace std;
#define ll long long
vector<ll> primes = {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53};
ll ans = 0;
ll max_divisors = 0;
void f(ll rest, ll mini, ll pos, ll num, ll divisors) {
if (divisors > max_divisors) {
ans = num;
max_divisors = divisors;
}
ll pwr = 0;
while (rest >= primes[pos] && pwr < mini) {
rest /= primes[pos];
pwr++;
num *= primes[pos];
f(rest, pwr, pos + 1, num, divisors * (1 + pwr));
}
}
int main() {
ll maxi;
cin >> maxi;
f(maxi, 100, 0, 1, 1);
cout << ans << " " << max_divisors << endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8dmVjdG9yPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwojZGVmaW5lIGxsIGxvbmcgbG9uZwoKdmVjdG9yPGxsPiBwcmltZXMgPSB7MiwgMywgNSwgNywgMTEsIDEzLCAxNywgMTksIDIzLCAyOSwgMzEsIDM3LCA0MSwgNDMsIDQ3LCA1M307CmxsIGFucyA9IDA7CmxsIG1heF9kaXZpc29ycyA9IDA7Cgp2b2lkIGYobGwgcmVzdCwgbGwgbWluaSwgbGwgcG9zLCBsbCBudW0sIGxsIGRpdmlzb3JzKSB7CiAgICBpZiAoZGl2aXNvcnMgPiBtYXhfZGl2aXNvcnMpIHsKICAgICAgICBhbnMgPSBudW07CiAgICAgICAgbWF4X2Rpdmlzb3JzID0gZGl2aXNvcnM7CiAgICB9CgogICAgbGwgcHdyID0gMDsKICAgIHdoaWxlIChyZXN0ID49IHByaW1lc1twb3NdICYmIHB3ciA8IG1pbmkpIHsKICAgICAgICByZXN0IC89IHByaW1lc1twb3NdOwogICAgICAgIHB3cisrOwogICAgICAgIG51bSAqPSBwcmltZXNbcG9zXTsKICAgICAgICBmKHJlc3QsIHB3ciwgcG9zICsgMSwgbnVtLCBkaXZpc29ycyAqICgxICsgcHdyKSk7CiAgICB9Cn0KCmludCBtYWluKCkgewogICAgbGwgbWF4aTsKICAgIGNpbiA+PiBtYXhpOwogICAgZihtYXhpLCAxMDAsIDAsIDEsIDEpOwogICAgY291dCA8PCBhbnMgPDwgIiAiIDw8IG1heF9kaXZpc29ycyA8PCBlbmRsOwogICAgcmV0dXJuIDA7Cn0K