#include <bits/stdc++.h>
using namespace std;
const long long LINF = 1001002003004005006ll;
int dx[] = {1, 0, -1, 0};
int dy[] = {0, 1, 0, -1};
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
int main() {
  int n;
  cin >> n;
  long long a[n], app[3] = {-1, -1, -1};
  int c = 0;
  bool zf = false;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] == 0) zf = true;
    if (app[0] != a[i] && app[1] != a[i] && a[i] != app[2]) {
      if (c < 2) {
        app[c] = a[i];
        c++;
      } else {
        c++;
      }
    }
  }
  if (c % 3 == 0) {
    if (a[0] == a[1] ^ a[2] || a[1] == a[0] ^ a[2] || a[2] == a[0] ^ a[1])
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
  } else {
    cout << ((c == 1) ? "Yes" : "No") << endl;
  }
  return 0;
}
