#include <bits/stdc++.h>
using namespace std;
template <typename T1, typename T2>
inline bool chmin(T1& a, T2 b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
template <typename T1, typename T2>
inline bool chmax(T1& a, T2 b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  multiset<int> se;
  int s = 0;
  bool all0 = true;
  for (long long i = 0; i < (long long)(n); i++) {
    cin >> a[i];
    if (a[i] != 0) {
      all0 = false;
    }
    se.insert(a[i]);
    s ^= a[i];
  }
  sort((a).begin(), (a).end());
  if (n != 3) {
    if (all0) {
      cout << "Yes"
           << "\n";
    } else {
      cout << "No"
           << "\n";
    }
  } else {
    if (s == 0) {
      cout << "Yes"
           << "\n";
    } else {
      cout << "No"
           << "\n";
    }
  }
  bool flag = true;
  return 0;
}
