#include <bits/stdc++.h>
using namespace std;
inline int min(register int a, register int b) { return a < b ? a : b; }
inline int max(register int a, register int b) { return a > b ? a : b; }
inline int read() {
  register int s = 0, f = 1;
  register char ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (isdigit(ch)) s = (s << 1) + (s << 3) + (ch ^ 48), ch = getchar();
  return s * f;
}
int n;
int a[100005];
map<int, int> mp;
vector<int> G;
int main() {
  n = read();
  int cnt = 0;
  for (register int i = 1; i <= n; ++i) {
    a[i] = read();
    if (mp[a[i]] == 0) {
      cnt++;
      G.push_back(a[i]);
    }
    mp[a[i]]++;
  }
  if (n == 3) {
    if (a[1] ^ a[2] ^ a[3] == 0)
      puts("Yes");
    else
      puts("No");
    return 0;
  }
  if (n % 3 == 0) {
    if (cnt != 3)
      puts("No");
    else {
      if (G[1] ^ G[2] ^ G[0] == 0)
        puts("Yes");
      else
        puts("No");
    }
    return 0;
  }
  if (mp[0] == n)
    puts("Yes");
  else
    puts("No");
  return 0;
}
