#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  ll n;
  cin >> n;
  vector<ll> v(n);
  ll zeros = 0;
  ll x = 0;
  for (int i = 0; i < n; ++i) {
    cin >> v[i];
    x = x ^ v[i];
    if (v[i] == 0) ++zeros;
  }
  if (n % 2 == 0) {
    if (zeros == n)
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
  } else {
    if (x == 0 && (zeros == 0 || zeros == n))
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
  }
  return 0;
}
