#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  if (count(a.begin(), a.end(), 0) == n) {
    cout << "Yes" << endl;
    return 0;
  }
  if (n % 3 != 0) {
    cout << "No" << endl;
    return 0;
  } else {
    sort(a.begin(), a.end());
    a.erase(unique(a.begin(), a.end()), a.end());
    if (a.size() != 3) {
      cout << "No" << endl;
      return 0;
    } else {
      if (a[0] == a[1] ^ a[2] || a[1] == a[0] ^ a[2] || a[2] == a[0] ^ a[1]) {
        cout << "Yes" << endl;
        return 0;
      }
    }
  }
}
