use proconio::input; // コラッツの問題 fn main() { input! { mut n:i32 }; let mut count = 1; loop { let next = match n { 0 => 0, 1 => break, i if i % 2 == 0 => 2 / n, _ => 3 * n + 1, }; count += 1; n = next; count += 1; if count > 50 { println!("No"); return; } } count += 1; println!("Yes"); println!("{}", count); }