#include <bits/stdc++.h>
int N;
int i, j, l, z, hantei;
int count;
int a[100000];
int riyou[100000];
int f(int, int);
int main(void) {
  hantei = 0;
  scanf("%d", &N);
  for (i = 1; i < N + 1; i++) {
    scanf("%d", &a[i]);
    riyou[i + 1] = 0;
  }
  for (i = 1; i < N + 1; i++) {
    for (j = 1; j < N + 1; j++) {
      if (j != i) {
        for (l = 0; l < N; l++) {
          riyou[l + 1] = 0;
        }
        riyou[i] = 1;
        riyou[j] = 1;
        count = 2;
        f(i, j);
        count = 0;
        for (l = 0; l < N; l++) {
          riyou[l + 1] = 0;
        }
      }
    }
  }
  if (hantei == 1) {
    printf("Yes");
  } else {
    printf("No");
    return 0;
  }
}
int f(int x, int y) {
  int k;
  if (count == N) {
    if (((int)(a[i] ^ a[x]) == a[y]) && (a[y] ^ a[j] == a[i])) {
      hantei = 1;
    }
  } else {
    for (k = 1; k < N + 1; k++) {
      if ((riyou[k] == 0) && ((int)(a[x] ^ a[k]) == a[y])) {
        count = count + 1;
        riyou[k] = 1;
        f(y, k);
      }
    }
  }
  return 0;
}
