N=int(input()) l=2 for c in range(1,52): if l<3:l=3+(N==1) elif l>3:break else:N,l=[N//2,N*3+1][N&1],2 if c<51:print("Yes"),print(c) else:print("No")