#[allow(unused_macros)] macro_rules! read_line_to_tuple { ( $( $t:ty ),* ) => {{ let mut input = String::new(); std::io::stdin().read_line(&mut input).unwrap(); let mut iter = input.split_whitespace(); ( $( iter.next().unwrap().parse::<$t>().unwrap() ),* ) }}; } #[allow(unused_macros)] macro_rules! read_line_to_collection { ( $t:ty ) => {{ let mut input = String::new(); std::io::stdin().read_line(&mut input).unwrap(); let iter = input.split_whitespace(); iter.map(|x| x.parse().unwrap()).collect::<$t>() }}; } fn main() { let (_n, k) = read_line_to_tuple!(i64, usize); let a = read_line_to_collection!(Vec); let mut v = vec![false; 100]; for i in 0..k { if a[i] < 100 { v[a[i] as usize] = true; } if a[i] > 20 { for j in 1..=5 { if i + j >= k { break; } let d = a[i + j] - a[i]; if d == 1 || d == 3 || d == 5 { v[1] = true; } } } } for i in (1..90).rev() { if v[i + 1] && v[i + 6] { v[i] = true; } if v[i + 2] && v[i + 5] { v[i] = true; } if v[i + 3] && v[i + 4] { v[i] = true; } } println!("{}", if v[1] { "No" } else { "Yes" }); }