#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> vec(n);
  for (int i = 0; i < n; i++) {
    cin >> vec[i];
  }
  if (n == 3) {
    if (vec[0] ^ vec[1] == vec[2]) {
      cout << "Yes";
      return 0;
    }
    cout << "No";
    return 0;
  }
  for (int i = 0; i < n; i++) {
    if (vec[i] != 0) {
      cout << "No";
      return 0;
    }
  }
  cout << "Yes";
}
