#include <bits/stdc++.h>
using namespace std;
const int sz = 1e5 + 1, mod = 1e9 + 7;
long long n, a[sz];
bool isPoss(int x) {
  int i;
  vector<int> v;
  unordered_map<long long, int> mp;
  for (i = 1; i < n; i++) mp[a[i]]++;
  mp[a[x]]--;
  v.push_back(a[0]);
  v.push_back(a[x]);
  for (i = 2; i < n; i++) {
    if (mp[v[i - 1] ^ v[i - 2]] == 0) return false;
    v.push_back(v[i - 1] ^ v[i - 2]);
    mp[v[i - 1] ^ v[i - 2]]--;
  }
  if (v[n - 1] == v[n - 2] ^ v[0]) return true;
  return false;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int i, j;
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (i = 1; i < n; i++) {
    if (isPoss(i)) {
      cout << "Yes";
      return 0;
    }
  }
  cout << "No";
}
