macro_rules! get {
    ($t:ty) => {
        {
            let mut line: String = String::new();
            std::io::stdin().read_line(&mut line).unwrap();
            line.trim().parse::<$t>().unwrap()
        }
    };
    ($($t:ty),*) => {
        {
            let mut line: String = String::new();
            std::io::stdin().read_line(&mut line).unwrap();
            let mut iter = line.split_whitespace();
            (
                $(iter.next().unwrap().parse::<$t>().unwrap(),)*
            )
        }
    };
    ($t:ty; $n:expr) => {
        (0..$n).map(|_|
                    get!($t)
        ).collect::<Vec<_>>()
    };
    ($($t:ty),*; $n:expr) => {
        (0..$n).map(|_|
                    get!($($t),*)
        ).collect::<Vec<_>>()
    };
    ($t:ty |) => {
        {
            let mut line: String = String::new();
            std::io::stdin().read_line(&mut line).unwrap();
            line.split_whitespace()
                .map(|t| t.parse::<$t>().unwrap())
                .collect::<Vec<_>>()
        }
    };
    ($t:ty | $n:expr) => {
        (0..$n).map(|_| get!($t |)).collect::<Vec<_>>()
    };
}

fn main() {
    let N = get!(usize);
    let As = get!(u64 |);

    for i in 1..N {
        let mut zero = As[0];
        let mut used = vec![false; N];
        used[0] = true;
        let mut one = As[i];
        used[i] = true;

        for cnt in 2..N {
            let mut flg = false;
            for k in 1..N {
                if used[k] {
                    continue;
                }
                if zero ^ one == As[k] {
                    zero = one;
                    one = As[k];
                    used[k] = true;
                    flg = true;
                    break;
                }
            }
            if !flg {
                break;
            }
            if cnt == N-1 {
                if zero ^ one == As[0] {
                    println!("Yes");
                    return;
                }
            }
        }
    }
    println!("No");
}
