#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  bool f = true;
  int a[n + 2];
  for (int i = 0; i < (int)n; i++) cin >> a[i];
  sort(a, a + n);
  a[n] = a[0];
  a[n + 1] = a[1];
  for (int i = 0; i < (int)n; i++)
    if ((a[i] ^ a[i + 2]) != a[i + 1]) f = false;
  if (f) {
    cout << "Yes" << endl;
    return 0;
  } else {
    f = true;
    for (int i = 0; i < (int)n; i++) {
      int b = a[i];
      a[i] = a[i + 1];
      a[i + 1] = b;
      if ((a[i] ^ a[i + 2]) != a[i + 1]) f = false;
    }
    if (f)
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
    return 0;
  }
}
