primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53]
ans = 0
max_divisors = 0
def f(rest, mini, pos, num, divisors):
global ans, max_divisors
if divisors > max_divisors:
ans = num
max_divisors = divisors
pwr = 0
while(rest>=primes[pos] and pwr<mini):
rest//=primes[pos]
pwr+=1
num*=primes[pos]
f(rest, pwr, pos+1, num, divisors*(1+pwr))
maxi = int(input())
f(maxi, 100, 0, 1, 1)
print(ans, max_divisors)
cHJpbWVzID0gWzIsIDMsIDUsIDcsIDExLCAxMywgMTcsIDE5LCAyMywgMjksIDMxLCAzNywgNDEsIDQzLCA0NywgNTNdCmFucyA9IDAKbWF4X2Rpdmlzb3JzID0gMApkZWYgZihyZXN0LCBtaW5pLCBwb3MsIG51bSwgZGl2aXNvcnMpOgogICAgZ2xvYmFsIGFucywgbWF4X2Rpdmlzb3JzCiAgICBpZiBkaXZpc29ycyA+IG1heF9kaXZpc29yczoKICAgICAgICBhbnMgPSBudW0KICAgICAgICBtYXhfZGl2aXNvcnMgPSBkaXZpc29ycwogICAgCiAgICBwd3IgPSAwCiAgICB3aGlsZShyZXN0Pj1wcmltZXNbcG9zXSBhbmQgcHdyPG1pbmkpOgogICAgICAgIHJlc3QvLz1wcmltZXNbcG9zXQogICAgICAgIHB3cis9MQogICAgICAgIG51bSo9cHJpbWVzW3Bvc10KICAgICAgICBmKHJlc3QsIHB3ciwgcG9zKzEsIG51bSwgZGl2aXNvcnMqKDErcHdyKSkKCm1heGkgPSBpbnQoaW5wdXQoKSkKZihtYXhpLCAxMDAsIDAsIDEsIDEpCnByaW50KGFucywgbWF4X2Rpdmlzb3JzKQ==