#include <bits/stdc++.h>
using namespace std;
const int N = 100001;
int a[N];
int main() {
  int n;
  cin >> n;
  multiset<int> s;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
    s.insert(a[i]);
  }
  int f = a[0];
  vector<int> t;
  for (int i = 1; i < n; ++i) {
    int l = (f ^ a[i]);
    for (int j = i + 1; j < n; ++j) {
      if (l == a[j]) {
        t.push_back(j);
      }
    }
  }
  bool isOk = false;
  for (int x : t) {
    int a0 = a[0];
    int a1 = a[x];
    multiset<int> remain = s;
    remain.erase(remain.find(a[0]));
    remain.erase(remain.find(a[x]));
    while (remain.size() > 0) {
      auto it = remain.find(a0 ^ a1);
      if (it == remain.end()) break;
      a0 = a1;
      a1 = *it;
      remain.erase(it);
    }
    if (remain.empty()) isOk = true;
    break;
  }
  cout << (isOk ? "Yes" : "No") << endl;
}
