import collections,sys,math,functools,operator,itertools,bisect,heapq,decimal,string,time,random #sys.setrecursionlimit(10**9) #sys.set_int_max_str_digits(0) n = int(input()) #alist = list(map(int,input().split())) #alist = [] #s = input() ans = 1 for i in range(51): ans += 1 if n == 1: if ans >= 50: exit(print('No')) print('Yes') exit(print(ans)) if n % 2 == 0: n //= 2 else: n = 3*n+1 ans += 1 print('No')