#include <bits/stdc++.h>
using namespace std;
vector<int> vls;
vector<int> cts;
void add(int vl) {
  for (int i = 0; i < vls.size(); i++) {
    if (vls[i] == vl) {
      cts[i]++;
      return;
    }
  }
  vls.push_back(vl);
  cts.push_back(1);
}
int main() {
  int N;
  scanf("%d", &N);
  for (int i = 0; i < N; i++) {
    int as;
    scanf("%d", &as);
    add(as);
  }
  if (vls[0] == 0 && vls.size() == 1) {
    printf("Yes\n");
    return 0;
  }
  if (vls.size() == 2) {
    if (vls[0] == 0 && cts[0] * 2 == cts[1]) {
      printf("Yes\n");
      return 0;
    }
    if (vls[1] == 0 && cts[1] * 2 == cts[0]) {
      printf("Yes\n");
      return 0;
    }
  }
  if (vls.size() == 3) {
    if (vls[0] ^ vls[1] == vls[2]) {
      if (cts[0] == cts[1] && cts[0] == cts[2]) {
        printf("Yes\n");
        return 0;
      }
    }
  }
  printf("No\n");
  return 0;
}
