use std::{collections::HashSet, io::Read}; fn main() { let mut s = String::new(); std::io::stdin().read_to_string(&mut s).ok(); let v: Vec = s.split_whitespace().flat_map(str::parse).collect(); let mut h = HashSet::new(); let mut t = 0; for &a in &v[2..] { t ^= a; h.insert(t); } println!( "{}", if h.iter().any(|x| h.contains(&(x ^ v[1]))) { "Yes" } else { "No" } ) }