#include <bits/stdc++.h>
using namespace std;
using P = pair<int, int>;
const int MOD = 1e9 + 7;
const int INF = 1e9;
int main() {
  int N;
  cin >> N;
  vector<long long> a(N);
  for (int i = 0; i < int(N); ++i) cin >> a[i];
  sort((a).begin(), (a).end());
  std::map<long long, long long> map;
  for (int i = 0; i < int(N); ++i) {
    map[a[i]]++;
  }
  long long cnt = map.size();
  cerr << cnt << endl;
  if (N % 3 != 0) {
    if (map[0] == N) {
      cout << "Yes" << endl;
    } else {
      cout << "No" << endl;
    }
    return 0;
  }
  string ans = "No";
  if (cnt == 3) {
    long long res = 0;
    for (auto x : map) {
      res ^= x.first;
    }
    if (res == 0) ans = "Yes";
  } else if (cnt == 2) {
    if (map[0] == N / 3) ans = "Yes";
  } else if (cnt == 1) {
    if (map[0] == N) ans = "Yes";
  }
  cout << ans << endl;
}
