#include <bits/stdc++.h>
using namespace std;
inline bool EQ(double num1, double bin) { return fabs(num1 - bin) < 1e-9; }
const int INF = 1 << 29;
using namespace std;
using ll = long long;
using namespace std;
using namespace std;
int main() {
  int i, j, n, chrVal = 0, kase;
  cin >> n;
  int a[n + 1];
  for (i = 0; i < n; i++) cin >> a[i];
  for (i = 0; i < n; i++) {
    for (j = 0; j < n && j != i; j++) {
      for (kase = 0; kase < n && kase != i && kase != j; kase++) {
        if ((a[j] ^ a[kase]) != a[i]) {
          chrVal = 1;
          break;
        }
      }
      if (chrVal == 1) break;
    }
    if (chrVal == 1) break;
  }
  if (chrVal == 1)
    cout << "No";
  else
    cout << "Yes";
  return 0;
}
