#include <bits/stdc++.h>
using namespace std;
const int N = (int)1e5 + 5;
map<int, int> mp;
int n;
int a[N];
int main() {
  iostream::sync_with_stdio(0);
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    mp[a[i]]++;
  }
  if (n % 3) {
    if (mp[0] != n)
      cout << "No";
    else
      cout << "Yes";
  } else {
    if (mp.size() != 1 && mp.size() != 3) {
      cout << "No";
      return 0;
    }
    bool ok = 1;
    int xorr = 0;
    for (auto v : mp)
      ok &= (v.second % (n / 3) == 0),
          xorr ^= ((v.second >= (n / 3)) ? v.first : 0),
          xorr ^= ((v.second >= ((n / 3) * 2)) ? v.first : 0),
          xorr ^= ((v.second >= ((n / 3) * 3)) ? v.first : 0);
    if (ok && xorr == 0)
      cout << "Yes";
    else
      cout << "No";
  }
}
