#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline void MIN(T &a, T b) {
  if (a > b) a = b;
}
template <typename T>
inline void MAX(T &a, T b) {
  if (a < b) a = b;
}
const int N = 100005;
int n, a[N];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (int i = (1); i <= (n); ++i) cin >> a[i];
  if (n == 3) {
    sort(a + 1, a + 1 + 3);
    do {
      a[4] = a[1];
      a[0] = a[3];
      bool fl = 1;
      for (int i = (1); i <= (3); ++i) {
        if (a[i] != a[i - 1] ^ a[i + 1]) {
          fl = 0;
          break;
        }
      }
      if (fl) return cout << "Yes", 0;
    } while (next_permutation(a + 1, a + 3 + 1));
    cout << "No";
  } else {
    for (int i = (1); i <= (n); ++i)
      if (a[i]) return cout << "No", 0;
    cout << "Yes";
  }
  return 0;
}
