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