#include <stdio.h>
#include <algorithm>
#include <vector>
#include <string>
const long long mod = 1000000007;

struct D {
	int a, n;
};

int search(D* d, int t, int n) {
	if (d[0].a == t)return 0;
	int r = 0;
	for (int i = 20; i >= 0; i--) {
		int c = r + 1 << i;
		if (c >= n)continue;
		if (d[c].a == t)return c;
		if (d[c].a < t)r = c;
	}
	return -1;
}

int main() {
	int N;
	scanf("%d", &N);
	int *a = new int[N];
	for (int i = 0; i < N; i++) {
		scanf("%d", a + i);
	}
	std::sort(a, a + N);
	std::vector<D> d;
	for (int i = 0; i < N; i++) {
		if (i != 0 && d[d.size() - 1].a == a[i]) {
			d[d.size() - 1].n++;
		}
		else {
			d.push_back({ a[i],1 });
		}
	}
	bool can = false;
	d[0].n--;
	int n = d.size();
  if(n>=1000){printf("No");return 0;}
	for (int i = 0; i < n; i++) {
		int bb = d[0].a, b;
		if (d[i].n == 0)continue;
		b = d[i].a;
		int c = search(d.data(), bb^b, n);
		if (c != -1 && d[c].n > 0) {
			std::vector<D> e;
			for (int j = 0; j < n; j++) {
				e.push_back(d[j]);
			}
			e[i].n--;
			can = true;
			for (int j = 0; j < N - 2; j++) {
				int c = search(e.data(), bb^b, n);
				if (c != -1 && e[c].n > 0) {
					bb = b;
					b = e[c].a;
					e[c].n--;
				}
				else {
					can = false;
					break;
				}
			}
			if (can) {
				if (bb^b == e[0].a) {
					break;
				}
				else {
					can = false;
				}
			}*/
		}
	}
	printf(can ? "Yes" : "No");
	return 0;
}