#include <bits/stdc++.h>
using namespace std;
const int N = 100010;
int _w;
int n, a[N];
map<int, int> cnt;
int main() {
  _w = scanf("%d", &n);
  for (int i = 1; i <= n; ++i) _w = scanf("%d", a + i);
  for (int i = 1; i <= n; ++i) ++cnt[a[i]];
  if (cnt.size() == 1 && cnt.begin()->first == 0) {
    puts("Yes");
  } else {
    if (n % 3 == 0) {
      if (cnt.size() == 3) {
        auto it = cnt.begin();
        int x = it->first;
        ++it;
        int y = it->first;
        ++it;
        int z = it->first;
        if ((x ^ y ^ z) == 0) {
          puts("Yes");
        } else {
          puts("No");
        }
      } else {
        puts("No");
      }
    } else {
      puts("No");
    }
  }
  return 0;
}
