#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; ++i) cin >> a[i];
  for (int i = 0; i < n; ++i) {
    int tmp = 0;
    for (int j = i + 1; j < n; ++j) {
      for (int k = 0; k < n; ++k) {
        if (k % 2 == 0) {
          tmp ^= a[i];
        } else {
          tmp ^= a[j];
        }
      }
      if (tmp == 1) {
        cout << "Yes" << endl;
        return 0;
      }
    }
  }
  cout << "No" << endl;
}
