#include <bits/stdc++.h>
using namespace std;
signed main() {
  int n;
  cin >> n;
  int xor_all = 0;
  map<int, int> m;
  int nums = 0;
  for (int i = 0; i < n; i++) {
    int a;
    cin >> a;
    if (m[a] == 0) {
      nums++;
    }
    m[a]++;
    xor_all ^= a;
  }
  if (n % 3 == 0 && xor_all == 0) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
  return 0;
}
