#include <bits/stdc++.h>
#pragma GCC optimize(2)
#pragma GCC optimize(3)
#pragma GCC optimize(4)
using namespace std;
const int N = 1e5 + 10;
int n, a[N];
multiset<int> s;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) scanf("%d", &a[i]), s.insert(a[i]);
  int x = a[1], y = a[2], st = x;
  s.erase(s.find(x));
  s.erase(s.find(y));
  for (int i = 3; i <= n; ++i) {
    int nx = x ^ y;
    if (s.find(nx) == s.end())
      return 0 * puts("No");
    else {
      s.erase(s.find(nx));
      x = y;
      y = nx;
    }
  }
  if ((x ^ y) != st) return 0 * puts("No");
  puts("Yes\n");
  return 0;
}
