#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<int> a(N);
  unordered_map<int, int> mp;
  for (int i = 0; i < N; i++) {
    cin >> a[i];
    mp[a[i]]++;
  }
  bool boolean;
  for (int i = 1; i < N; i++) {
    vector<int> cammel(N);
    unordered_map<int, int> count;
    boolean = true;
    cammel[0] = a[0];
    count[cammel[0]]++;
    cammel[1] = a[i];
    count[cammel[1]]++;
    for (int j = 2; j < N; j++) {
      cammel[j] = (cammel[j - 1] xor cammel[j - 2]);
      if (count[cammel[j]] < mp[cammel[j]]) {
        count[cammel[j]]++;
      } else {
        boolean = false;
        break;
      }
    }
    if (boolean) {
      if (cammel[N - 1] != (cammel[0] xor cammel[N - 2])) {
        boolean = false;
      }
    }
  }
  if (boolean)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  return 0;
}
