#include <bits/stdc++.h>
using namespace std;

//int a[100001];
int b[100001];
bool c[100001];

int main() {
	int N; cin >> N;
	vector<int> a[N]; 
	
	for (int i=0; i<N; i++) {
		int tmp;
		cin >> tmp;
		a.push_back(tmp);
		b[i] = 0;
		c[i] = false;
	}
	
  	int x = 0;
    for (int i=1; i<N; i++) {
        x ^= a[i];
    }
  	if (x != 0) {
        cout << "No" << endl;
        return 0;
    }
	
	sort(a.begin(), a.end());
	
	b[0] = a[0];
	c[0] = true;

  	int count = N-1;
	for (int j=1; j<N; j++) {
		for (int k=j+1; k<N; k++) {
			if (b[0]^a[j] == a[k]) {
				b[1] = a[k];
				b[2] = a[j];
				c[k] = true;
				c[j] = true;
				count -= 2;
			}
		}
	}
	
	for (int i=1; i<N-2; i++) {
		for (int j=1; j<N; j++) {
			if (c[j] == false) {
				if (b[i]^a[j] > b[i+1]) break;
				if (b[i]^a[j] == b[i+1]) {
					b[i+1] = a[j];
					c[j] = true;
					count -= 1;
				}
			}
		}
	}
	
    if (count > 0) {
      cout << "No" << endl;
      return 0;
    }

	if (b[0]^b[N-2]==b[N-1]) {	
		cout << "Yes" << endl;
	} else {
        cout << "No" << endl;
	}
	
	return 0;
}
