#include <bits/stdc++.h>
using namespace std;
template <typename T>
void cins(vector<T>& arr) {
  for (T& e : arr) cin >> e;
}
int main(void) {
  int num;
  cin >> num;
  vector<int> arr(num);
  cins(arr);
  bool ans = 0;
  if (num >= 4) {
  } else {
    vector<int> idx = {0, 1, 2};
    int flag = 1;
    do {
      flag &= ((arr[idx[0]] ^ arr[idx[1]]) == arr[idx[2]]);
    } while (next_permutation(idx.begin(), idx.end()));
    ans = flag;
  }
  cout << (ans ? "Yes" : "No") << endl;
  return 0;
}
