#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
int a[N], n, ans[N];
map<int, int> f;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    f[a[i]]++;
  }
  f[a[1]]--;
  for (int i = 2, ok; i <= n; i++) {
    ans[2] = i;
    ok = 1;
    for (int j = 3; j <= n; j++) {
      ans[j] = ans[j - 1] ^ ans[j - 2];
      if (f[ans[j]])
        f[ans[j]]--;
      else {
        ok = 0;
        break;
      }
    }
    if (ans[1] ^ ans[n - 1] == ans[n]) {
      puts("Yes");
      return 0;
    }
  }
  puts("No");
  return 0;
}
