N = int(input()) P = 0 while True: P += 1 if P > 50: print('No') break if N == 1: print('Yes') print(P+1) break if N%2 == 0: N //= 2 else: N = 3*N + 1 P += 1