#include <bits/stdc++.h>
using namespace std;
using ll = long long int;
int n;
vector<ll> a;
map<ll, int> num;
int main(void) {
  cin >> n;
  a = vector<ll>(n);
  ll tmp = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (i == 0) {
      tmp = a[i];
    } else {
      tmp = tmp ^ a[i];
    }
  }
  string ret = "No";
  if (n % 3 == 0) {
    if (tmp == 0) ret = "Yes";
  }
  cout << ret << endl;
  return 0;
}
