#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
int main() {
  long long N;
  cin >> N;
  vector<long long> A(N);
  map<long long, int> mp{};
  for (int i = 0; i < (int)(N); i++) cin >> A[i], mp[A[i]]++;
  if (mp.size() == 1) {
    if (mp[0] != 0) {
      cout << "Yes" << endl;
      return 0;
    }
  }
  if (mp.size() == 3) {
    vector<long long> a(0);
    long long num = mp.begin()->second;
    for (auto s : mp) {
      a.push_back(s.first);
      if (s.second != num) {
        cout << "No" << endl;
        return 0;
      }
    }
    if (a[0] ^ a[1] ^ a[2] == 0) {
      cout << "Yes" << endl;
      return 0;
    }
  }
  cout << "No" << endl;
}
