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]);
            if(i != 0){
                xor = x[i] ^ x[i -1];
            }
        }

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