#include <bits/stdc++.h>
using namespace std;
const int N = 100005;
int n;
map<int, int> book;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    int x;
    scanf("%d", &x);
    book[x]++;
  }
  if (book.size() != 3) {
    printf("No");
    return 0;
  }
  int ans = 0;
  for (auto [u, num] : book) ans ^= u;
  if (ans != 0) {
    printf("No");
    return 0;
  }
  int cnt = book.begin()->second;
  for (auto [u, num] : book)
    if (cnt != num) {
      printf("No");
      return 0;
    }
  printf("Yes");
  return 0;
}
