#include <bits/stdc++.h>
using namespace std;
long long Ceil(long long val, long long div) { return (val + div - 1) / div; }
long long CeilN(long long val, long long div) { return Ceil(val, div) * div; }
long long FloorN(long long x, long long n) { return (x - x % n); }
bool IsOdd(long long x) { return ((x & 1) == 1); }
bool IsEven(long long x) { return ((x & 1) == 0); }
long long _accumulate(const vector<long long>& v) {
  return accumulate((v).begin(), (v).end(), (long long)0);
}
template <class T>
bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
void Solve() {
  long long N;
  cin >> N;
  map<long long, long long> a;
  for (long long i = 0; i < (long long)N; ++i) {
    long long _a;
    cin >> _a;
    a[_a]++;
  }
  string ans = "No";
  if (1 == a.size()) {
    if (a.count(0)) ans = "Yes";
  } else if (2 == a.size()) {
    if (a.count(0) * 3 == N) {
      ans = "Yes";
    }
  } else if (3 == a.size()) {
    long long calRes = 0;
    for (auto one : a) {
      if (one.second * 3 != N) {
        calRes = -1;
        break;
      }
      calRes ^= one.first;
    }
    if (calRes == 0) ans = "Yes";
  }
  cout << ans << endl;
}
int main() {
  cin.tie(nullptr);
  ios_base::sync_with_stdio(false);
  cout << fixed << setprecision(15);
  Solve();
  return 0;
}
