import sys sys.setrecursionlimit(5*10**5) input = sys.stdin.readline from collections import defaultdict, deque, Counter from heapq import heappop, heappush from bisect import bisect_left, bisect_right from math import gcd n = int(input()) ans = [] cnt = 1 while cnt < 50: if n == 1: cnt += 1 print('Yes') print(cnt) exit() else: if n % 2 == 0: n //= 2 cnt += 2 else: n = 3*n+1 cnt += 2 print('No')