#include <bits/stdc++.h>
using namespace std;
map<int, int> mp;
int num;
int a[100010];
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    if (mp[a[i]])
      ;
    else {
      mp[a[i]] = 1;
      num++;
    }
  }
  sort(a + 1, a + 1 + n);
  for (int i = 2; i <= n; i++) {
    int tmp = a[i - 1] ^ a[i];
    if (mp[tmp] == 1) {
      mp[tmp] = 0;
      num--;
    }
  }
  if (mp[a[n] ^ a[1]] == 1) num--;
  if (num == 0)
    puts("Yes");
  else
    puts("No");
}
