pc = 1 step = 0 while True: step += pc <= 3 if step > 50: print('No') break if pc == 1: n = int(input()) pc += 1 elif pc == 2: if n == 1: pc = 4 else: pc += 1 elif pc == 3: if n % 2 == 0: n //= 2 else: n = 3 * n + 1 pc = 2 else: print('Yes') print(step) break