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