n = int(input()) step = 2 cnt = 1 while(1): cnt += 1 if (cnt > 50): print("No") exit() if (step == 2): if (n == 1): break else: step = 4 else: if (n % 2 == 0): n = n // 2 else: n = n * 3 + 1 step = 2 print("Yes") print(cnt)