#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, o = 0, a, b, c, u = 1;
  scanf("%d", &n);
  scanf("%d", &a);
  for (int i = 1; i < n; i++) {
    int l;
    scanf("%d", &l);
    if (u == 1) {
      if (l != a) {
        b = l;
        u++;
      }
    }
    if (u == 2) {
      if (l != a && l != b) {
        c = l;
        u++;
      }
    }
    if (u == 3) {
      if (l != a && l != b && l != c) o++;
    }
  }
  if ((a ^ b) != c || o)
    printf("No\n");
  else
    printf("Yes\n");
}
