#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> num;
  map<int, int> nums;
  for (int i = 0; i < n; i++) {
    int t;
    cin >> t;
    num.push_back(t);
    if (nums.find(t) != nums.end()) {
      nums[t]++;
    } else {
      nums[t] = 1;
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++) {
      if (i == j) continue;
      int a = num[i];
      int b = num[j];
      map<int, int> nums2 = nums;
      nums2[a]--;
      nums2[b]--;
      int first = a;
      int prev = a;
      int cur = b;
      for (int k = 2; k < n + 1; k++) {
        int next = prev ^ cur;
        if (k != n) {
          if (nums2.find(next) == nums2.end() || nums2[next] == 0) {
            break;
          }
          prev = cur;
          cur = next;
          nums2[next]--;
        } else {
          if (next == first) {
            cout << "Yes" << endl;
            return 0;
          }
        }
      }
    }
  }
  cout << "No" << endl;
  return 0;
}
