#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int n;
  vector<long long int> a;
  cin >> n;
  vector<long long int> ans;
  for (int i = 0; i < n; ++i) {
    long long int ai;
    cin >> ai;
    a.push_back(ai);
  }
  long long int begin = a[0];
  long long int left, right;
  bool flag = false;
  for (int i = 1; i < a.size() - 1; ++i) {
    left = a[i];
    for (int j = i + 1; j < a.size(); ++j) {
      right = a[j];
      if (begin == (a[i] ^ a[j])) {
        ans.push_back(left);
        ans.push_back(begin);
        ans.push_back(right);
        a.erase(a.begin() + j);
        a.erase(a.begin() + i);
        a.erase(a.begin());
        flag = true;
        break;
      }
    }
    if (flag) {
      break;
    }
  }
  if (!flag) {
    cout << "No" << endl;
    return 0;
  }
  for (int i = 0; i < a.size();) {
    if ((ans[ans.size() - 1] ^ ans[ans.size() - 2]) == a[i]) {
      ans.push_back(a[i]);
      a.erase(a.begin() + i);
      i = 0;
      continue;
    }
    i++;
  }
  if (a.size() == 0 && (ans[ans.size() - 1] ^ ans[ans.size() - 2]) == ans[0]) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
  return 0;
}
