#include <bits/stdc++.h>
using namespace std;
const int N = 100005;
int n, a[N];
map<int, int> mp;
int main() {
  scanf("%d", &n);
  int t = 0;
  if (n % 3) {
    puts("No");
    return 0;
  }
  for (int i = 1; i <= n; ++i) scanf("%d", &a[i]), mp[a[i]]++, t ^= a[i];
  if (t) {
    puts("No");
    return 0;
  }
  sort(a + 1, a + n + 1);
  n /= 3;
  t = a[1] ^ a[n + 1] ^ a[n + n + 1];
  for (int i = 1; i <= n * 3; ++i)
    if (mp[a[i]] % n) {
      puts("No");
      return 0;
    };
  if (mp[0] || !t) {
    puts("Yes");
    return 0;
  }
  puts("No");
  return 0;
}
