n=int(input()) for i in range(1,51): if n==1: print("Yes") print(i-1) exit() if n%2==0: n//=2 else: n=3*n+1 print("No")