#include<bits/stdc++.h>
using namespace std;
int main()
  {
  int n; cin>>n; int p; map<int,int> mp;
  for(int i=0;i<n;i++) {cin>>p; mp[p]++;}
  for(auto x:mp) {vec.push_back(x.first); sec.push_back(x.second);}
  if (n%3==0) {
    if (vec.size()==3){ 
          if (vec[0]^vec[1]==vec[2] && sec[0]==sec[1] && sec[1]==sec[2])
            cout<<"Yes";
      else cout<<"No";
      }
      else if (vec.size()==2) {
         if(vec[0]==0 && sec[1]==2*sec[0]) cout<<"Yes"; else cout<<"No";
        }
        else if (vec.size()==1) {
          if(vec[0]==0) cout<<"Yes"; else cout<<"No";
          }
          else cout<<"No";
  }
  else {
     if(vec[0]==0) cout<<"Yes"; else cout<<"No";
  }
  return 0;
  }