n=int(input()) c=0 for i in range(50): c+=1 if n==1: if c<50: print('Yes') c+=1 print(c) exit() else: break elif n%2==0: n//=2 c+=1 else: n=n*3+1 c+=1 if c>50: break print('No')