#include <bits/stdc++.h>
using namespace std;
vector<long long int> a(100005);
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%lld", &a[i]);
  vector<int> is{0};
  long long int pre_num = a[0];
  bool cont_flag = true;
  while (cont_flag) {
    cont_flag = false;
    for (int i = 0; i < n; i++) {
      auto it_is = find(is.begin(), is.end(), i);
      if (it_is != is.end()) continue;
      long long int next_num = pre_num ^ a[i];
      auto it_a = find(a.begin(), a.end(), next_num);
      if (it_a != a.end()) {
        pre_num = next_num;
        is.emplace_back(i);
        cont_flag = true;
        break;
      }
    }
  }
  if (is.size() == n && a[0] == a[is.back()] ^ a[is[1]])
    printf("Yes\n");
  else
    printf("No\n");
  return 0;
}
