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