N=int(input()) count=1 while count<=49: count+=1 if N==1: print('Yes') print(count) exit(0) count+=1 if N%2==1: N*=3 N+=1 else: N//=2 print('No')