import std; void main () { int N = readln.chomp.to!int; long ans = 0; ans++; // 手順1 while (true) { ans++; // 手順2 if (N == 1 && ans <= 50) break; if (N % 2 == 0) { N /= 2; } else { N = 3*N+1; continue; } ans++; // 手順3 if (50 < ans) { writeln("No"); return; } } writeln("Yes"); writeln(ans); } void read(T...)(string S, ref T args) { auto buf = S.split; foreach (i, ref arg; args) { arg = buf[i].to!(typeof(arg)); } }