#![allow(dead_code)] fn input_num() -> usize { let mut line: String = String::new(); std::io::stdin().read_line(&mut line).unwrap(); line.trim().parse().unwrap() } fn input_chars() -> Vec { let mut line: String = String::new(); std::io::stdin().read_line(&mut line).unwrap(); line.trim().chars().collect() } fn input_nums() -> (usize, f64, f64) { let mut line: String = String::new(); std::io::stdin().read_line(&mut line).unwrap(); let mut iter = line.split_whitespace(); ( iter.next().unwrap().parse().unwrap(), iter.next().unwrap().parse().unwrap(), iter.next().unwrap().parse().unwrap() ) } fn input_vec_nums() -> Vec { let mut line: String = String::new(); std::io::stdin().read_line(&mut line).unwrap(); line.split_whitespace() .map(|x| x.parse().unwrap()) .collect() } fn input_str() -> String { let mut line: String = String::new(); std::io::stdin().read_line(&mut line).unwrap(); for _ in 0..2 { line.remove(line.len() - 1); } line } fn main() { let s = input_chars(); if s[0] == s[1] && s[0] != s[2] { println!("Yes"); } else { println!("No"); } }