#include <iostream>
using namespace std;
const int N=100005;
int a[N];
int main()
{
//必胜状态,奇数阶异或为非0
int n;
cin>>n;
int res=0;
for(int i=1;i<=n;i++){
cin>>a[i];
if(i%2==1)
{
res^=a[i];
}
}
if(res) cout<<"Yes"<<endl;
else
cout<<"No"<<endl;
//cout << "Hello world!" << endl;
return 0;
}