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