fn main() { let mut n = String::new(); std::io::stdin().read_line(&mut n).ok(); let n: usize = n.trim().parse().unwrap(); let mut a = String::new(); std::io::stdin().read_line(&mut a).ok(); let a: Vec = a.trim().split_whitespace().map(|s| s.parse().unwrap()).collect(); if a[0] > a[n-1] { println!("No"); return; } let mut result = (1..a[0]).collect::>(); for i in 1..n { if a[0] < a[i] { result.push(a[i]); } } println!("Yes"); println!("{}", result.iter().map(|v| v.to_string()).collect::>().join(" ")); }