N = input() num = 1 did = False for _ in range(55) : num += 1 if N == 1 : print("Yes") print(num + 1) did = True break else : num += 1 if N & 1 : N = N * 3 + 1 else : N = N // 2 if not did : print("No")