N=int(input()) ANS=2 while N!=1 and ANS<=50: if N%2==0: N//=2 else: N=N*3+1 ANS+=2 if ANS<=50: print("Yes") print(ANS) else: print("No")