#include <bits/stdc++.h>
using namespace std;
int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1};
const int MOD = 1000000007;
struct Pony {
  long a, b;
  Pony(long a_, long b_) {
    a = a_;
    b = b_;
  }
  bool operator<(const Pony &another) const { return b < another.b; };
};
int fac(int k) {
  int sum = 0;
  for (int i = 1; i <= k; ++i) {
    sum += i;
  }
  return sum;
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  map<long, int> a;
  long fst;
  for (auto i = 0; i < (n); i++) {
    long b;
    cin >> b;
    a[b] = a[b] ? a[b] + 1 : 1;
    fst = b;
  }
  a[fst]--;
  long snd = -1;
  long thd = -1;
  for (auto it = a.begin(); it != a.end(); ++it) {
    snd = it->first;
    thd = fst ^ snd;
    if ((a[thd] && snd != thd) || a[thd] > 1) {
      a[snd]--;
      a[thd]--;
      break;
    } else {
      snd = -1;
      thd = -1;
    }
  }
  if (snd == -1) {
    cout << "No" << endl;
  } else {
    long b1 = snd;
    long b2 = thd;
    bool res = true;
    for (long i = 3; i < n; i++) {
      long tmp = b1 ^ b2;
      if ((a[tmp] && b2 != tmp) || a[tmp] > 1) {
        a[tmp]--;
        b1 = b2;
        b2 = tmp;
      } else {
        res = false;
        break;
      }
    }
    if ((b2 ^ snd) != fst) res = false;
    cout << (res ? "Yes" : "No") << endl;
  }
}
