#include <bits/stdc++.h>
using namespace std;
bool Pairsecond(const pair<int, int>& pf, pair<int, int>& ps) {
  return pf.second < ps.second;
}
int main() {
  int n;
  cin >> n;
  vector<int> a;
  vector<int> a2;
  for (int i = 0; n > i; i++) {
    int tmp;
    cin >> tmp;
    a.push_back(tmp);
    a2.push_back(tmp);
  }
  sort(a.begin(), a.end());
  a.erase(std::unique(a.begin(), a.end()), a.end());
  if (a.size() == 1 && a[0] == 0) {
    cout << "Yes" << endl;
    return 0;
  }
  if (a.size() == 2) {
    sort(a2.begin(), a2.end());
    bool change = false;
    int nwa = 1;
    int nwb = 0;
    for (int i = 1; n > i; i++) {
      if (a2[i - 1] != a2[i]) change = true;
      if (change)
        nwb++;
      else
        nwa++;
    }
    if (nwa * 2 == nwb || nwb * 2 == nwa) {
      cout << "Yes" << endl;
    } else {
      cout << "No" << endl;
    }
    return 0;
  }
  if (a.size() != 3) {
    cout << "No" << endl;
    return 0;
  }
  int aaa = 0;
  for (int i = 0; a.size() > i; i++) {
    aaa = aaa ^ a[i];
  }
  if (aaa == 0) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
}
