use std::{collections::VecDeque, io::*}; fn main() { let mut input: String = String::new(); std::io::stdin().read_to_string(&mut input).ok(); let mut itr = input.trim().split_whitespace(); let n: usize = itr.next().unwrap().parse().unwrap(); let m: usize = itr.next().unwrap().parse().unwrap(); let l: usize = itr.next().unwrap().parse().unwrap(); let a: Vec = (0..n) .map(|_| itr.next().unwrap().parse().unwrap()) .collect(); let mut q: VecDeque = VecDeque::new(); let mut used = vec![false; 1001]; used[l] = true; q.push_back(l); while let Some(v) = q.pop_front() { for i in 0..n { let nv = (v + a[i]) / 2; if !used[nv] { used[nv] = true; q.push_back(nv); } } } println!("{}", if used[m] { "Yes" } else { "No" }); }