#include <bits/stdc++.h>
using namespace std;
signed main() {
  long long n;
  cin >> n;
  map<long long, long long> mp;
  for (long long i = 0; i < n; i++) {
    long long a;
    cin >> a;
    mp[a]++;
  }
  if (mp[0] == n) {
    cout << "Yes" << endl;
    return 0;
  }
  if (n % 3 != 0) {
    cout << "No" << endl;
    return 0;
  }
  auto itr = mp.begin();
  long long val1 = next(itr)->first;
  long long val2 = next(itr, 2)->first;
  long long val3 = next(itr, 3)->first;
  if (mp.size() == 4 && (val1 ^ val2 ^ val3) == 0) {
    cout << "Yes" << endl;
    return 0;
  } else {
    cout << "No" << endl;
    return 0;
  }
}
