#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false), cin.tie(nullptr);
  int N;
  cin >> N;
  map<int, int> mp;
  mp[0] = 0;
  for (int i = 0; i < N; i++) {
    int a;
    cin >> a;
    mp[a]++;
  }
  if (mp[0] == N) {
    cout << "Yes" << endl;
    return 0;
  } else {
    mp.erase(0);
    if (N % 3 or mp.size() != 3) {
      cout << "No" << endl;
      return 0;
    } else {
      bool ok = true;
      int res = 0;
      for (auto p : mp) {
        res ^= p.first;
        if (p.second != N / 3) ok = false;
      }
      if (ok and res == 0) {
        cout << "Yes" << endl;
        return 0;
      } else {
        cout << "No" << endl;
        return 0;
      }
    }
  }
}
