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 {
        *map.entry(a_i).or_insert(0) += 1;
    }

    let ans = match map.len() {
        1 => match map.get(&0) {
            Some(_) => "Yes",
            None => "No",
        },
        2 => {
            let counts: Vec<_> = map.iter().map(|k| *k.1).collect();
            if (counts[0] == 0 && counts[0] == counts[1] * 2)
                || (counts[1] == 0 && counts[0] * 2 == counts[1])
            {
                "Yes"
            } else {
                "No"
            }
        }
        3 => {
            let keys: Vec<_> = map.keys().map(|x| *x).collect();
            if keys.iter().fold(0, |a, x| a ^ x) == 0
                && map.values().all(|x| x == map.get(&keys[0]).unwrap())
            {
                "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()
}
