#include <bits/stdc++.h>
using ll = long long;
using itn = int;
using namespace std;
int GCD(int a, int b) { return b ? GCD(b, a % b) : a; }
int main() {
  int n;
  cin >> n;
  ll a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  bool p = false;
  for (int i = 0; i < n; i++) {
    if (a[i] != 0) p = true;
  }
  map<int, int> a3;
  if (p) {
    for (int i = 0; i < n; i++) {
      a3[a[i]] = a[i];
    }
    if (a3.size() != 3) {
      cout << "No" << endl;
    } else {
      ll tmp = a3[0] ^ a[1];
      tmp ^= a3[2];
      if (tmp == 0 && a3[0] != a3[1] && a3[3] != a3[2]) {
        cout << "Yes" << endl;
      } else {
        cout << "No" << endl;
      }
    }
  } else {
    cout << "Yes" << endl;
  }
  return 0;
}
