use std::collections::BTreeMap;
use std::io::prelude::*;
use std::io::stdin;
use std::str::FromStr;

fn main() {
    let n: usize = read();
    let a: Vec<u64> = (0..n).map(|_| read()).collect();

    let mut map = BTreeMap::new();

    for &a_i in a.iter() {
        *map.entry(a_i).or_insert(0) += 1;
    }

    let ans = match map.len() {
        1 => {
            if a.iter().all(|&x| x == 0) {
                "Yes"
            } else {
                "No"
            }
        }
        3 => {
            let key_value: Vec<_> = map.iter().collect();
            if key_value.iter().fold(0, |a, x| a ^ x.0) == 0
                && key_value.iter().all(|x| x.1 == key_value[0].1)
            {
                "Yes"
            } else {
                "No"
            }
        }
        _ => "No",
    };
    println!("{}", ans);
}

#[allow(dead_code)]
fn read<T: FromStr>() -> T {
    let stdin = stdin();
    let token: String = stdin
        .lock()
        .bytes()
        .map(|b| b.unwrap() as char)
        .skip_while(|c| c.is_whitespace())
        .take_while(|c| !c.is_whitespace())
        .collect();
    token.parse().ok().unwrap()
}
