#include <bits/stdc++.h>
using namespace std;
int n;
bool trial(map<int, int> cnt, int first, int second) {
  int pre = first;
  int cur = second;
  cnt[first]--, cnt[second]--;
  for (int i = 0; i < int(n - 2); ++i) {
    int nxt = pre ^ cur;
    if (cnt[nxt] == 0) return false;
    cnt[nxt]--;
    pre = cur, cur = nxt;
  }
  return (pre ^ cur) == first;
}
int main(void) {
  cin >> n;
  vector<int> a(n);
  map<int, int> cnt;
  for (int i = 0; i < int(n); ++i) {
    cin >> a[i];
    cnt[a[i]]++;
  }
  for (int i = 1; i <= int(n - 1); ++i) {
    if (trial(cnt, a[0], a[i])) {
      cout << "Yes" << endl;
      return 0;
    }
  }
  cout << "No" << endl;
  return 0;
}
