#include <bits/stdc++.h>
using namespace std;
int n;
int a[100010];
bool isUsed[100010];
std::map<int, int> countMap;
int ans[100010];
bool doSearch(int num) {
  int p = 2;
  while (p < n) {
    ans[p] = ans[p - 2] ^ ans[p - 1];
    if (countMap[ans[p]] == 0) {
      for (int i = 2; i < p; i++) countMap[ans[i]]++;
      return false;
    } else {
      countMap[ans[p]]--;
      p++;
    }
  }
  if (ans[0] == ans[1] ^ ans[n - 1]) {
    return true;
  } else {
    for (int i = 2; i < n; i++) countMap[ans[i]]++;
    return false;
  }
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &(a[i]));
    countMap[a[i]]++;
  }
  ans[0] = a[0];
  countMap[a[0]]--;
  for (int i = 1; i < n; i++) {
    countMap[a[i]]--;
    ans[1] = a[i];
    if (doSearch(i)) {
      printf("Yes\n");
      return 0;
    }
    countMap[a[i]]++;
  }
  printf("No\n");
  return 0;
}
