import java.util.*; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int step = 1; int nn = N; while(step <= 50){ step++; if(nn == 1){ System.out.println("Yes\n"+step); return; } if(nn % 2 == 0){ nn /= 2; }else{ nn = 3 * nn + 1; } step++; } System.out.println("No"); } }