#include <iostream>
#include <cmath>
#include <string>
#include <vector>
#include <map>
#include <queue>
#include <boost/multi_array.hpp>


int main() {
    int n;
    std::cin >> n;
    
    long long a[n];
    for (int i = 0; i < n; i++) {
        std::cin >> a[i];
    }
    
    // a^c = b <=> a^c^a = c^a^a = c^0 = c = b^a = a^b
    // yes <=> tot = a_s(1)^a_s(2)^...^a_s(n) == a_s(3)^a_s(3)^...a_s(n) = a_s(n-3)^...a_s(n)
    //     <=> ... <=> @n%3 = 0, tot == 0, @n%3 = 1, tot == a_s(n), @n%3 =2, tot == a_s(1)
    
    bool flag = false;
    long long tot = 0;
    for (int i = 0; i < n; i++) {
        tot ^= a[i];
    }
    if (n%3 == 0) {
        if (tot == 0) {
            flag = true;
        }
    } else {
        for (int i = 0; i < n; i++) {
            if (tot == a[i]) {
                flag = true;
                break;
            }
        }
    }
    
    if (flag) {
        std::cout << "Yes" << std::endl;
    } else {
        std::cout << "No" << std::endl;
    }
    return 0;
}
