#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  unordered_map<long long, int> um;
  for (int i = 0; i < n; ++i) {
    long long l;
    cin >> l;
    ++um[l];
  }
  if (n % 3 == 0) {
    if (um.size() == 3 && (*um.begin()).second == (*(++um.begin())).second &&
        (*um.begin()).second == (*(++ ++um.begin())).second) {
      long long a = um.begin()->first;
      long long b = (++um.begin())->first;
      long long c = (++ ++um.begin())->first;
      if ((a ^ b) == c && (a ^ c) == b && (b ^ c) == a) {
        cout << "Yes" << endl;
      } else
        cout << "No" << endl;
    } else {
      cout << "No" << endl;
    }
  } else {
    if (um.size() == 1 && (*um.begin()).first == 0) {
      cout << "Yes" << endl;
    } else {
      cout << "No" << endl;
    }
  }
}
