#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  scanf("%d", &N);
  set<int> vals;
  for (int i = 0; i < N; i++) {
    int a;
    scanf("%d", &a);
    vals.insert(a);
  }
  int sum = 0;
  for (auto a : vals) sum ^= a;
  if ((vals.size() == 1 && sum == 0) ||
      (sum == 0 && N % 3 == 0 && vals.size() == 3)) {
    puts("Yes");
  } else {
    puts("No");
  }
  return 0;
}
