using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

class Program {
    static void Main (string[] args) {
        int n = int.Parse(Console.ReadLine());
        string[] a = Console.ReadLine ().Split(' ');
        long[] x = new long[n];
        long xor = 0;
        long kijyun = 0;
        long temp = 0;
        int cnt = 0;
        string ans = "No";

        for(int i=0;i<n;i++){
            x[i] = long.Parse(a[i]);
        }

        for(int i=0;i<n;i++){
            kijyun = x[i];
            for(int j=0;j<n;j++){                
                if(i != j && cnt == 0){
                    if (cnt == 0){
                        xor = x[j] ^ temp;
                    }
                    temp = x[j];                    
                }
            }
            if((xor ^ kijyun)/2 == 0){
                ans = "Yes";
            }
            xor = 0;
        }
        Console.WriteLine(ans);
    }
}