#include <bits/stdc++.h>
using namespace std;
using int32 = int_fast32_t;
using int64 = int_fast64_t;
const int32 INF = 1e9;
const int32 MOD = 1e9 + 7;
const int64 LLINF = 1e18;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int32 n;
  cin >> n;
  vector<int32> a(n);
  sort((a).begin(), (a).end());
  for (int64 i = 0; i < (n); ++i) cin >> a[i];
  for (int64 i = (1); i < (n); i++) {
    int32 prev = a[0];
    int32 cur = a[i];
    int32 next;
    vector<bool> used(n, false);
    used[0] = used[i] = true;
    bool found = true;
    for (int64 j = (2); j < (n); j++) {
      next = prev ^ cur;
      int32 k = lower_bound((a).begin(), (a).end(), next) - a.begin();
      bool flg = false;
      while (k < n) {
        if (a[k] > next) break;
        if (used[k]) {
          ++k;
          continue;
        }
        flg = true;
        used[k] = true;
        ++k;
      }
      if (!flg) {
        found = false;
        break;
      }
      prev = cur;
      cur = next;
    }
    if (found) {
      if (a[0] ^ prev == cur) {
        cout << ((true) ? "Yes\n" : "No\n");
        return 0;
      }
    }
  }
  cout << ((false) ? "Yes\n" : "No\n");
  return 0;
}
