using System; class Program { static void Main(string[] args) { var n = int.Parse(Console.ReadLine()); var count = 0; var c = 50; Action step1 = null, step2 = null, step3 = null; step1 = (int num) => { count++; if (count <= c) { if (num == n) step2(num); } }; step2 = (int num) => { count++; if (count <= c) { if (num != 1) step3(num); } }; step3 = (int num) => { count++; if (count <= c) { if (num % 2 == 0) step2(num / 2); else step2(3 * num + 1); } }; step1(n); if(count <= 50) { Console.WriteLine("Yes"); Console.WriteLine(count); } else Console.WriteLine("No"); } }