#include<bits/stdc++.h>
using namespace std;
/* 对于非平衡状态,先手必赢,因为先手可以将石子拿成平衡状态
让后后手拿几个,先手就拿几个。平衡状态下先手必输*/
/**/
int main()
{
int n,res=0;
cin>>n;
while(n--)
{
int x;
cin>>x;
res^=x;
}
if(res)
{
cout<<"Yes";
}
else
{
cout<<"No";
}
}