#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 7;
int n, a[maxn], p[maxn];
int main() {
  scanf("%d", &n);
  a[0] = -1;
  for (int i = 1; i <= n; ++i) scanf("%d", &a[i]);
  sort(a + 1, a + n + 1);
  if (a[n] == 0)
    printf("Yes\n");
  else {
    if (n % 3)
      printf("No\n");
    else {
      int cnt = 0;
      for (int i = 1; i <= n && cnt <= 3; ++i) {
        if (a[i] != a[i - 1]) {
          if ((i - 1) % (n / 3)) {
            cnt = -1;
            break;
          }
          p[++cnt] = a[i];
        }
      }
      if (cnt != 3)
        printf("No\n");
      else {
        if ((p[1] ^ p[2]) == p[3])
          printf("Yes\n");
        else
          printf("No\n");
      }
    }
  }
  return 0;
}
