use std::io::Read; fn main() { let mut s = String::new(); std::io::stdin().read_to_string(&mut s).ok(); let s: Vec<_> = s.replace('\n', "").chars().collect(); let a = s.windows(2).all(|w| w[0] != w[1]); println!("{}", if a { "Yes" } else { "No" }); }