#include <bits/stdc++.h>
using namespace std;
int main(int argc, char *argv[]) {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  multiset<int> ms1, ms2;
  int n;
  cin >> n;
  vector<int> v(n);
  for (int i = 0; i < n; i++) {
    int t;
    cin >> t;
    v[i] = t;
    ms1.insert(t);
  }
  for (int i = 1; i < n; i++) {
    int p1 = v[0];
    int p2 = v[i];
    ms2 = ms1;
    ms2.erase(p1);
    ms2.erase(p2);
    bool ok = true;
    while (1) {
      int p3 = p1 ^ p2;
      if (ms2.size() == 0) {
        if (p3 != v[0]) {
          ok = false;
        }
        break;
      }
      if (ms2.find(p3) != ms2.end()) {
        ms2.erase(p3);
        p1 = p2;
        p2 = p3;
      } else {
        ok = false;
        break;
      }
    }
    if (ok) {
      cout << "Yes" << endl;
      return 0;
    }
  }
  cout << "No" << endl;
  return 0;
}
