#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, t;
  cin >> n;
  int a[n];
  map<int, int> m;
  cin >> a[0];
  t = a[0];
  for (int i = 1; i < n; i++) {
    cin >> a[i];
    t = t ^ a[i];
    if (m.count(a[i]))
      m[a[i]]++;
    else
      m.insert(pair<int, int>(a[i], 1));
  }
  if (m.size() > 3 || t != 0) {
    cout << "No";
    return 0;
  }
  int p, q;
  int i = 2;
  p = a[0];
  q = a[1];
  m[p]--;
  m[q]--;
  if (m[p] == 0) m.erase(p);
  if (m[q] == 0) m.erase(q);
  while (i != n) {
    t = p ^ q;
    if (m.count(t)) {
      m[t]--;
      if (m[t] == 0) m.erase(t);
    } else {
      cout << "No";
      return 0;
    }
    i++;
    p = q;
    q = t;
  }
  t = p ^ q;
  if (t != a[0])
    cout << "No";
  else
    cout << "Yes";
  return 0;
}
