#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;

int main() {
  int n; cin >> n; // 3<=n<=10^5
  vector<long> a(n); rep(i,n) cin >> a[i]; // 1<=ai<=10^9

  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) {
        if (a[i] ^ a[j] != a[k]) {
          cout << "No" << endl;
          return 0;
        }
      }
    }
  }
  cout << "Yes" << endl;
  return 0;
}
