#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  vector<int> v(n);
  for (int i = 0; i < n; i++) cin >> v[i];
  bool same = true;
  for (int i = 0; i < n; i++) {
    if (v[i] != 0) {
      same = false;
      break;
    }
  }
  if ((n == 3 && (v[0] ^ v[1]) == v[2] && (v[0] ^ v[2]) == v[1] &&
       (v[1] ^ v[2]) == v[0]) ||
      same)
    cout << "Yes\n";
  else
    cout << "No\n";
  return 0;
}
