#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using pi = pair<ll, ll>;
int n;
int A[100005];
void input() {
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> A[i];
}
void calc() {
  if (n % 3 != 0) {
    for (int i = 2; i <= n; i++) {
      if (A[i] != A[1]) {
        cout << "No";
        return;
      }
    }
    cout << "Yes";
  } else {
    map<int, int> mp;
    for (int i = 1; i <= n; i++) {
      mp[A[i]]++;
    }
    int x = 0;
    for (auto i : mp) {
      int v = i.second;
      while (v > n / 3) {
        x ^= i.first;
        v -= n / 3;
      }
      if (v > 0) {
        cout << "No";
        return;
      }
    }
    if (x != 0) {
      cout << "No";
    } else
      cout << "Yes";
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  input();
  calc();
  return 0;
}
