#include <bits/stdc++.h>
using namespace std;
template <class T>
inline void chmax(T &ans, T t) {
  if (t > ans) ans = t;
}
template <class T>
inline void chmin(T &ans, T t) {
  if (t < ans) ans = t;
}
int main() {
  int n;
  cin >> n;
  vector<long long> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  bool flag = true;
  long long tmp = 0;
  if (n % 2 == 0) {
    for (int i = 0; i < n - 1; ++i) {
      tmp ^= a[i];
    }
  } else {
    for (int i = 0; i < n - 2; ++i) {
      tmp ^= a[i];
    }
  }
  if (tmp == a[0]) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
}
