#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a[n];
  unordered_set<int> s;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    s.insert(a[i]);
  }
  vector<int> b;
  b.push_back(a[0]);
  bool flg = 0;
  int tmp = 0;
  for (int i = 0; i < n; i++) {
    if (i == 0) {
      for (int j = i + 1; j < n; j++) {
        if (s.find(a[i] ^ a[j]) != s.end()) {
          b.push_back(a[j]);
          tmp = a[i] ^ a[j];
          break;
        }
        if (j == n) {
          cout << "No" << endl;
          flg = 1;
          break;
        }
      }
    } else if (i == n - 1) {
      if (b[i - 1] ^ tmp == a[0]) {
        b.push_back(tmp);
        break;
      } else {
        cout << "No" << endl;
        flg = 1;
        break;
      }
    } else {
      if (s.find(b[i] ^ tmp) != s.end()) {
        b.push_back(tmp);
        s.erase(a[i]);
        tmp = a[i] ^ tmp;
      } else {
        cout << "No" << endl;
        flg = 1;
        break;
      }
    }
  }
  if (!flg) cout << "Yes" << endl;
  return 0;
}
