#include <stdio.h>
#include <stdlib.h>
int main(void)
{
    int N,i;
    int *a;

    scanf("%d", &N);
    a = malloc(sizeof(int*)*N);
    for(i=0;i<N;i++)
        scanf("%d", &a[i]);

    int count=0;
    for(int i=0;i<N;i++){
        for(int j=i+1;j<N;j++){
            int x = a[i]^a[j];
            for(int k=0; k<N; k++){
                if(k==i || k==j)
                    continue;
                if(a[k]==x)
                    count+=1;
                if(count>=N)
                    goto end;
            }
        }
    }
    end:
    if(count>=N)
        printf("Yes\n");
    else
        printf("No\n");

    return 0;   
}