#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool chmin(T& a, T b);
template <class T>
inline bool chmax(T& a, T b);
template <typename T>
ostream& operator<<(ostream& s, const vector<T>& v);
template <class T>
int64_t sum(vector<T> a);
template <class T>
double ave(vector<T> a);
int64_t n, k;
int64_t h, w;
int vector_finder(std::vector<int64_t> vec, int64_t number) {
  auto itr = std::find(vec.begin(), vec.end(), number);
  size_t index = std::distance(vec.begin(), itr);
  if (index != vec.size()) {
    return 1;
  } else {
    return 0;
  }
}
int main() {
  cin >> n;
  vector<int64_t> a(n);
  for (int i = 0; i < (int)(n); i++) {
    cin >> a[i];
  }
  sort(a.begin(), a.end());
  bool success = false;
  vector<int64_t> b(n);
  for (int64_t i = 1; i < n; i++) {
    int64_t sum = a[0];
    b[0] = a[0];
    sum ^= a[i];
    b[1] = a[i];
    int64_t cnt = 2;
    for (int64_t j = 2; j < n; j++) {
      if (vector_finder(a, b[j - 2] ^ b[j - 1])) {
        b[2] = *(std::find(a.begin(), a.end(), b[j - 2] ^ b[j - 1]));
      } else {
        break;
      }
      if (j == n - 1) {
        success = true;
        cout << "Yes" << endl;
        break;
      }
    }
    if (success) break;
  }
  if (!success) {
    cout << "No" << endl;
  }
  return 0;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <typename T>
ostream& operator<<(ostream& s, const vector<T>& v) {
  int len = v.size();
  for (int i = 0; i < len; ++i) {
    s << v[i];
    if (i < len - 1) s << "\t";
  }
  return s;
}
