#include <bits/stdc++.h>
using namespace std;
int t, n;
long long a[80005];
struct node {
  long long x;
  int k;
} b[5];
int main() {
  int r = 0;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%lld", &a[i]), r ^= a[i];
  if (r != 0) {
    printf("No\n");
    return 0;
  }
  sort(a + 1, a + n + 1);
  int cnt = 0, f = 0;
  for (int i = 1; i <= n; i++)
    if (a[i] != a[i - 1]) {
      b[++cnt].x = a[i];
      b[cnt].k = 1;
      if (cnt > 3) {
        printf("No\n");
        f = 1;
        break;
      }
    } else
      b[cnt].k++;
  if (!f) {
    if (cnt == 1) {
      if (b[1].x == 0)
        printf("Yes\n");
      else
        printf("No\n");
    } else if (cnt == 2) {
      if (b[1].x == 0)
        printf("Yes\n");
      else
        printf("No\n");
    } else {
      if (b[1].k == b[2].k && b[2].k == b[3].k) {
        if (b[1].x ^ b[3].x ^ b[2].x == 0)
          printf("Yes\n");
        else
          printf("No\n");
      }
    }
  }
}
