package main import . "fmt" func main() { var n int64 Scan(&n) op,steps:=1,0 var x int64 for { if steps >50 { Println("No") return } switch op { case 1: steps++ x=n op++ case 2: steps++ if x==1 { op=4 } else { op++ } case 3: steps++ if x%2==0 { x/=2 } else { x=3*x+1 } op=2 case 4: if steps<=50 { Println("Yes") Println(steps) } else { Println("No") } return } } }