#include <bits/stdc++.h>
using namespace std;
int n;
int a[100010];
std::map<int, int> countMap;
std::map<int, int> calcMap;
int ans[100010];
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &(a[i]));
    countMap[a[i]]++;
  }
  if (n % 3 != 0) {
    printf("No\n");
    return 0;
  }
  ans[0] = a[0];
  for (int i = 1; i < n; i++) {
    ans[1] = a[i];
    ans[2] = ans[0] ^ ans[1];
    calcMap[ans[0]] += n / 3;
    calcMap[ans[1]] += n / 3;
    calcMap[ans[2]] += n / 3;
    if ((calcMap[ans[0]] == countMap[ans[0]]) &&
        (calcMap[ans[1]] == countMap[ans[1]]) &&
        (calcMap[ans[2]] == countMap[ans[2]])) {
      printf("Yes\n");
      return 0;
    }
  }
  printf("No\n");
  return 0;
}
