#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int n;
  cin >> n;
  long long ai;
  map<long long, int> count;
  for (int i = 0; i < n; i++) {
    cin >> ai;
    if (count.find(ai) != count.end()) {
      count[ai] += 1;
    } else {
      count[ai] = 1;
    }
    if (count.size() > 3) {
      cout << "No" << endl;
      exit(0);
    }
  }
  long long sx = 0;
  if (n % 3 != 0) {
    cout << "No" << endl;
  } else {
    if (count.find(0) != count.end()) {
      if (count.size() == 1) {
        cout << "Yes" << endl;
      } else if (count.size() == 2) {
        if (count[0] == n / 3) {
          cout << "Yes" << endl;
        } else {
          cout << "No" << endl;
        }
      } else {
        cout << "No" << endl;
      }
    } else {
      if (count.size() == 3) {
        for (map<long long, int>::iterator it = count.begin();
             it != count.end(); it++) {
          sx = sx ^ (it->first);
        }
        if (sx == 0) {
          cout << "Yes" << endl;
        } else {
          cout << "No" << endl;
        }
      } else {
        cout << "No" << endl;
      }
    }
  }
}
