#include <bits/stdc++.h>
using namespace std;
template <typename T1, typename T2>
inline void chmin(T1 &a, T2 b) {
  if (a > b) a = b;
}
template <typename T1, typename T2>
inline void chmax(T1 &a, T2 b) {
  if (a < b) a = b;
}
signed main() {
  std::ios::sync_with_stdio(false);
  std::cin.tie(nullptr);
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (n); i++) cin >> a[i];
  sort((a).begin(), (a).end());
  vector<int> ans(n);
  ans[0] = a[0];
  ans[1] = a[1];
  for (int i = 2; i < n; i++) {
    ans[i] = ans[i - 1] ^ ans[i - 2];
  }
  if (ans[n - 1] != (ans[0] ^ ans[n - 2])) {
    cout << "No" << endl;
  } else if (ans[0] != (ans[1] ^ ans[n - 1])) {
    cout << "No" << endl;
  } else {
    sort((ans).begin(), (ans).end());
    if (ans == a)
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
  }
}
