fn main() { let mut n = String::new(); std::io::stdin().read_line(&mut n).ok(); let n: u64 = n.trim().parse().unwrap(); match n % 6 { 0 => println!("Yes"), _ => println!("No"), } }