#include <bits/stdc++.h>
using namespace std;
int chh;
const int N = 100005;
int n, m;
int a[N];
map<int, int> q;
bool gao() {
  if (n % 3) return m == 1 && a[0] == 0;
  if (m != 3) return 0;
  if (q[a[0]] != q[a[1]]) return 0;
  if (q[a[1]] != q[a[2]]) return 0;
  return a[0] ^ a[1] == a[2];
}
int main() {
  while (~scanf("%d", &n)) {
    q.clear();
    for (int i = 0; i < (n); i++) scanf("%d", &a[i]), q[a[i]]++;
    sort(a, a + n);
    m = unique(a, a + n) - a;
    puts(gao() ? "Yes" : "No");
  }
  return 0;
}
