fn main() { let mut s = String::new(); std::io::stdin().read_line(&mut s).ok(); println!( "{}", if s.trim().chars().all(|c| c == '9') { "Yes" } else { "No" } ); }