#include <bits/stdc++.h>

using namespace std;

using uint = unsigned long long;

int main(){
  uint n;
  cin >> n;
  cin.ignore();

  vector <uint> a;
  uint tmp;
  uint s = 0;

  for (uint i = 0; i < n; i++){
    cin >> tmp;
    s = s ^ tmp;
    a.push_back(tmp);
  }

  if(n % 3 == 0){
    if(s == 0){
      cout << "Yes" << endl;
      return 0;
    } else {
      cout << "No" << endl;
      return 0;
    }
  } else {
    for (uint i = 0; i < n; i++){
      if(s == a[i]){
        cout << "Yes" << endl;
        return 0;
      }
    }
    cout << "No" << endl;
    return 0;
  }

  return 0;
}
