#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using Pi = pair<int, int>;
using Pl = pair<ll, ll>;
int main() {
  int N;
  cin >> N;
  vector<int> a(N);
  for (int i = (int)(0); i < (int)(N); i++) cin >> a[i];
  map<int, int> m;
  for (int i = (int)(0); i < (int)(N); i++) {
    m[a[i]]++;
  }
  int cnt = 0;
  int now = 0;
  int cnt0 = 0;
  for (auto it = m.begin(); it != m.end(); it++) {
    now ^= it->first;
    cnt++;
    if (it->first == 0) cnt0++;
  }
  bool ok = false;
  if (N % 3 == 0 && now == 0 && cnt == 3) ok = true;
  if (N % 3 == 0 && cnt0 > 0 && cnt == 2) ok = true;
  bool flag = true;
  for (int i = (int)(0); i < (int)(N); i++) {
    if (a[i] != 0) flag = false;
  }
  if (flag) ok = true;
  if (ok)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
}
