n = tn = int(input()) minT = 0 for i in range(4, 0, -1): t = int(pow(tn, 1/i)) if tn % t == 0: tn /= t minT += t - 1 print(minT, n - 1)