n = int(input()) t = 9 ans = -1 lef = 0 rig = 1000 while rig - lef > 1: mid = (lef + rig) // 2 rep = pow(10, mid) if rep * rep < n: lef = mid else: rig = mid print(lef, rig) print(rig)