#include <bits/stdc++.h>
using namespace std;
signed main() {
  long long n;
  cin >> n;
  long long x = 0;
  long long k;
  bool ok = false;
  for (long long i = 0; i < n; i++) {
    long long a;
    cin >> a;
    x ^= a;
    if (i == 0)
      k = a;
    else if (!ok)
      if (k != a) ok = true;
  }
  if (x == 0 && ok)
    puts("Yes");
  else
    puts("No");
  return 0;
}
