#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> a(3, -1);
  int poss = 0;
  int cnt = 0;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    int j = 0;
    for (j = 0; j < cnt; j++) {
      if (x == a[j]) break;
    }
    if (j != cnt) continue;
    a[cnt++] = x;
    if (cnt > 3) {
      break;
    }
  }
  if (cnt == 3 && ((a[0] ^ a[1]) == a[2])) poss = 1;
  if (n % 3 != 0) {
    poss = 0;
  }
  if (poss)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
}
