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