#include <iostream>
#include <algorithm>
#include <vector>
#include <deque>
#include <queue>
#include <set>
#include <iomanip>
#include <cmath>
#include <boost/multiprecision/cpp_int.hpp>

using namespace std;
using ll = long long;
namespace mp = boost::multiprecision;

int main()
{
    // 整数の入力
    long long N;
    vector<ll> A;
    cin >> N ;
    for(int i = 0;i<N;i++){
        ll a;
        cin >> a;
        A.push_back(a);
    }
    sort(A.begin(),A.end());
    for(int i = 0;i < N;i++){
        // cout << (A[i] ^ A[(i+1) % N]) << endl;
        if( (A[i] ^ A[(i+1) % N]) != A[(i+2) % N]){
            cout << "No" << endl;
            return 0;
        };
    }
    cout << "Yes" << endl;
   return 0;
}