#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long int i, j = 0, r = 200, p, q, k = 0, ans = 0, d, y = 0, h, flag = 0,
                   n, m = 0, a, b, id, c, h1, h2, a1, b1;
  cin >> n;
  vector<long long int> v(n);
  set<long long int> s;
  for (i = 0; i < n; i++) cin >> v[i], s.insert(v[i]), m ^= v[i];
  if (n > 3) {
    if (s.size() % 3 == 0 and m == 0)
      cout << "Yes";
    else
      cout << "No";
    return;
  } else if (n == 3) {
    if (v[0] ^ v[1] == v[2])
      cout << "Yes";
    else
      cout << "No";
    return;
  }
  cout << "No";
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  while (t--) solve();
}
