#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  vector<long long> a;
  map<long long, long long> A;
  vector<long long> b(n);
  for (int i = 0; i < n; i++) {
    int z;
    cin >> z;
    a.push_back(z);
    A[z]++;
  }
  for (int i = 0; i < 2; i++) {
    for (int j = 0; j < n; j++) {
      if (i == j) {
        continue;
      }
      long long l = a[i], r = a[j];
      map<long long, long long> B;
      b[0] = l;
      b[1] = r;
      B[l]++;
      B[r]++;
      bool ans = true;
      for (int k = 2; k < n; k++) {
        b[k] = b[k - 2] ^ b[k - 1];
        B[b[k]]++;
        if (A[b[k]] < B[b[k]]) {
          ans = false;
          break;
        }
      }
      if (ans != true) {
        break;
      }
      if (b[0] != b[n - 2] ^ b[n - 1]) {
        continue;
      }
      if (ans) {
        cout << "Yes";
        return 0;
      }
    }
  }
  cout << "No";
}
