#include <bits/stdc++.h>
using namespace std;
int a[100005];
bool k = true;
int main(void) {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  if (n == 3) {
    int t = a[0] ^ a[1];
    t = t ^ a[2];
    if (t != 0) {
      k = false;
    }
  } else {
    for (int i = 0; i < n; i++) {
      if (a[i] != 0) {
        k = false;
      }
    }
  }
  if (k) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
}
