N = int(input()) if N <= 0: print("No") exit() cnt = 0 while N != 1: if N % 2: N = 3 * N + 1 else: N //= 2 cnt += 1 if cnt > 50: break if cnt <= 24: print("Yes") print(2 * cnt + 2) else: print("No")