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