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


int main() {
    int n;
    std::cin >> n;
    
    std::multiset<long long> ms, ms2;
    for (int i = 0; i < n; i++) {
        long long a;
        std::cin >> a;
        ms.insert(a);
    }
    
    // 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)
    //s(1)は任意　s(2)を定めると、全てが定まる
    //s(1)を適当に決め、forでs(2)を回す
    
    bool flag = false;
    auto itr = ms.begin();
    long long s1 = *itr;
    long long tmp, tmp2, tmp3;
    for (++itr; itr != ms.end(); itr++) {
        auto s2 = *itr;
        ms2 = ms;
        auto itr2 = ms2.begin();
        tmp = s1 ^ s2;
        tmp2 = s2;
        while (!ms2.empty()) {
            auto res = ms2.find(tmp);
            if (res == ms2.end()) {
                break;
            }
            ms2.erase(res);
            tmp3 = tmp;
            tmp = tmp2 ^ tmp;
            tmp2 = tmp3;
        }
        if (ms2.empty() && tmp != s1) {
            flag = true;
        }
    }
    
    if (flag) {
        std::cout << "Yes" << std::endl;
    } else {
        std::cout << "No" << std::endl;
    }
    return 0;
}
