#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
int vis[N], c[N];
vector<int> v;
int main(void) {
  int n, sum = 0;
  scanf("%d", &n);
  for (int i = 1, val; i <= n; i++) {
    scanf("%d", &val);
    sum ^= val;
    if (!vis[val]) {
      vis[val] = 1;
      v.push_back(val);
    }
    c[val]++;
  }
  if (v.size() == 1) {
    if (v[0] == 0) {
      puts("Yes");
    } else {
      puts("No");
    }
  } else if (v.size() == 3) {
    if ((v[0] ^ v[1] ^ v[2]) == 0) {
      ;
      if (c[v[0]] == c[v[1]] && c[v[0]] == c[v[2]])
        puts("Yes");
      else
        puts("No");
    } else
      puts("No");
  } else {
    puts("No");
  }
}
