#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
int main() {
  int N;
  cin >> N;
  vector<unsigned int> a(N);
  unordered_map<unsigned int, unsigned int> count;
  set<unsigned int> appeared;
  for (auto& i : a) {
    cin >> i;
    count[i]++;
    appeared.insert(i);
  }
  if (appeared.size() == 3) {
    int tmp = 0, tmpc = -1;
    for (unsigned int i : appeared) {
      tmp ^= i;
      if (tmpc >= 0 && tmpc != count[i]) {
        cout << "No" << endl;
        return 0;
      }
      tmpc = count[i];
    }
    if (tmp == 0) {
      cout << "Yes" << endl;
      return 0;
    }
  } else if (appeared.size() == 2 && count[*appeared.rbegin()] == count[0] * 2)
    cout << "Yes" << endl;
  else if (appeared.size() == 1 && *appeared.rbegin() == 0)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  return 0;
}
