fn main() { let mut n = String::new(); std::io::stdin().read_line(&mut n).ok(); let n = n.trim(); let ans = if n.match_indices("1").count() == 2 { "Yes" } else if !n.contains("01") && n.match_indices("1").count() != 1 { "Yes" } else { "No" }; println!("{}", ans); }