#include <bits/stdc++.h>
using namespace std;
void _main();
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  _main();
}
const int inf = INT_MAX / 2;
const long long infl = 1LL << 60;
template <class T>
bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
bool chmin(T &a, const T &b) {
  if (b < a) {
    a = b;
    return 1;
  }
  return 0;
}
void _main() {
  int N;
  cin >> N;
  vector<int> a(N);
  for (int i = 0; i < N; i++) cin >> a[i];
  if (N == 3) {
    sort(a.begin(), a.end());
    const bool yes = [&]() {
      return ((a[0] ^ a[2]) == a[1]) && ((a[1] ^ a[0]) == a[2]) &&
             ((a[2] ^ a[1]) == a[0]);
    }();
    cout << (yes ? "Yes" : "No") << endl;
  } else {
    const bool yes = [&]() {
      for (int i = 0; i < N; i++) {
        if (a[i] != 0) {
          return false;
        }
      }
      return true;
    }();
    cout << (yes ? "Yes" : "No") << endl;
  }
}
