#include <bits/stdc++.h>
using namespace std;
template <class n, class second>
ostream &operator<<(ostream &p, pair<n, second> x) {
  return p << "<" << x.first << ", " << x.second << ">";
}
template <class n>
auto operator<<(ostream &p, n y) ->
    typename enable_if<!is_same<n, string>::value,
                       decltype(y.begin(), p)>::type {
  int o = 0;
  p << "{";
  for (auto c : y) {
    if (o++) p << ", ";
    p << c;
  }
  return p << "}";
}
void dor() { cerr << endl; }
template <class n, class... second>
void dor(n p, second... y) {
  cerr << p << " ";
  dor(y...);
}
template <class n, class second>
void mini(n &p, second y) {
  if (p > y) p = y;
}
template <class n, class second>
void maxi(n &p, second y) {
  if (p < y) p = y;
}
const int M = 1024 * 1024;
int n;
map<int, int> mapa;
int main() {
  scanf("%d", &n);
  for (int i = (1); i <= (int)(n); ++i) {
    int a;
    scanf("%d", &a);
    mapa[a]++;
  }
  if (n % 3 != 0) {
    printf("No\n");
    return 0;
  }
  int xo = 0;
  for (auto x : mapa) {
    if (x.second % (n / 3) != 0) {
      printf("No\n");
      return 0;
    }
    for (int i = 0; i < x.second / (n / 3); i++) {
      xo ^= x.first;
    }
  }
  if (xo != 0) {
    printf("No\n");
    return 0;
  }
  printf("Yes\n");
  return 0;
}
