#include<cstdio>
#include<algorithm>
#include<map>
using namespace std;
#define N 80005
#define ll long long
int t,n;
ll a[N];
struct node
{
	ll x;
	int k;
}b[5];
int main()
{
	//freopen("circle.in","r",stdin);
    //freopen("circle.out","w",stdout);
    //scanf("%d",&t);
    //while(t--)
    //{
    	int r=0;
    	scanf("%d",&n);
    	for(int i=1;i<=n;i++)
    		scanf("%lld",&a[i]),r^=a[i];
    	if(r!=0)
    	{
    		printf("No\n");
    		return 0;//continue;
		}
		sort(a+1,a+n+1);
		int cnt=0,f=0;
		for(int i=1;i<=n;i++)
			if(a[i]!=a[i-1])
			{
				b[++cnt].x=a[i];
				b[cnt].k=1;
				if(cnt>3)
				{
					printf("No\n");
					f=1;
					break;
				}
			}
			else b[cnt].k++;
		if(!f)
		{
			if(cnt==1)
			{
				if(b[1].x==0)printf("Yes\n");
				else printf("No\n");
			}
			else if(cnt==2)
			{
				if(b[1].k==b[2].k)
				{
					if(b[1].x==b[2].x^b[2].x&&b[2].x==b[1].x^b[1].x)
						printf("Yes\n"),f=1;
				}
				if(!f&&b[1].k>1&&b[1].k%2==0)
				{
					if(b[1].k/2==b[2].k&&b[1].x==b[1].x^b[2].x&&b[2].x==b[1].x^b[1].x)
						printf("Yes\n"),f=1;
				}
				if(!f&&b[2].k>1&&b[2].k%2==0)
				{
					if(b[2].k/2==b[1].k&&b[2].x==b[2].x^b[1].x&&b[1].x==b[2].x^b[2].x)
						printf("Yes\n"),f=1;
				}
				if(!f)printf("No\n");
			}
			else
			{
				if(b[1].k==b[2].k&&b[2].k==b[3].k)
				{
					if(b[1].x^b[3].x^b[2].x==0)
						printf("Yes\n"),f=1;
					else printf("No\n");
				}
			}
		}
	//}
}