def main(): n = int(input()) cnt = 0 for i in range(100): if n%2 == 0: n //= 2 cnt += 2 else: if n == 1: cnt += 2 break else: n = 3*n+1 cnt += 2 if cnt <= 50: print("Yes") print(cnt) else: print("No") if __name__ == '__main__': main()