#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int n, a[100000], noz = 0;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] != 0) noz++;
  }
  if ((n == 3 && a[0] == (a[1] ^ a[2])) || noz == 0) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
}
