#include <bits/stdc++.h>
using ll = long long;
using namespace std;
template <class T>
inline bool chmax(T &a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T &a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
int main() {
  int n;
  cin >> n;
  int a[100010];
  for (int i = 0; i < (int)(n); i++) cin >> a[i];
  sort(a, a + n);
  int cu = 0;
  int sec = 1;
  for (int i = 1; i <= (int)(n - 2); i++) {
    if (a[i + 1] != a[i] ^ a[i - 1]) {
      cout << "No" << endl;
      return 0;
    }
  }
  if (a[0] == a[1] ^ a[n - 1]) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
}
