#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  map<int, int> u;
  for (int i = 0; i < n; i++) u[a[i]]++;
  if (u.size() > 3) {
    cout << "No" << endl;
    return 0;
  }
  if (n == 3) {
    int d = 0;
    for (auto x : a) {
      d ^= x;
    }
    if (d == 0)
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
    return 0;
  }
  if (u.size() == 1 && a[0] != 0) {
    cout << "No" << endl;
    return 0;
  }
  if (u.size() == 2) {
    cout << "No" << endl;
    return 0;
  }
  if (u.size() == 3) {
    int d = 0;
    for (auto it : u) {
      d ^= it.first;
      if (it.second * 3 != n) {
        cout << "No" << endl;
        return 0;
      }
    }
    if (d != 0) {
      cout << "No" << endl;
      return 0;
    }
  }
  cout << "Yes" << endl;
  return 0;
}
