fn main() { let mut nx = String::new(); std::io::stdin().read_line(&mut nx).ok(); let nx: Vec = nx.trim().split_whitespace().map(|s| s.parse().unwrap()).collect(); let n = nx[0]; let x = nx[1]; let mut a = String::new(); std::io::stdin().read_line(&mut a).ok(); let mut a: Vec = a.trim().split_whitespace().map(|s| s.parse().unwrap()).collect(); a.sort_by_key(|&v| v.min(v ^ x)); let result = (0..n-1).map(|i| a[i] < a[i+1] ^ x && a[i] ^ x < a[i+1]).fold(true, |x, y| x && y); if result { println!("Yes"); } else { println!("No"); } }