#include <bits/stdc++.h>
using namespace std;
const int N = 1e5;
int n;
int num[N + 3];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &num[i]);
  if (n == 3) {
    sort(num + 1, num + 1 + n);
    do {
      if ((num[1] ^ num[3]) == num[2] && num[1] == (num[2] ^ num[3]) &&
          num[3] == (num[1] ^ num[2])) {
        printf("Yes\n"), exit(0);
      }
    } while (num + 1, num + n + 1);
    printf("No\n");
    return 0;
  }
  for (int i = 1; i <= n; i++)
    if (num[i]) {
      printf("No\n");
      return 0;
    }
  printf("Yes\n");
  return 0;
}
