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