#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 11;
int n, a[N];
int main() {
  cin >> n;
  for (int i = (1), i_end = (n); i <= i_end; ++i) cin >> a[i];
  if (n <= 10) {
    sort(a + 1, a + n + 1);
    do {
      a[0] = a[n];
      a[n + 1] = a[1];
      int fl = 1;
      for (int i = (1), i_end = (n); i <= i_end; ++i)
        if (a[i] != (a[i - 1] ^ a[i + 1])) {
          fl = 0;
          break;
        }
      if (fl) {
        puts("Yes");
        return 0;
      }
    } while (next_permutation(a + 1, a + n + 1));
    puts("No");
  } else {
    for (int i = (1), i_end = (n); i <= i_end; ++i)
      if (a[i]) {
        puts("No");
        return 0;
      }
    puts("Yes");
  }
}
