from collections import defaultdict def dfs(x): global c c += 1 if c >= 50: print("No") exit() if x == 1: c += 1 return else: c += 1 if x % 2 == 0: dfs(x//2) else: dfs(x*3+1) n = int(input()) c = 0 dfs(n) print("Yes") print(c)