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

class Program
{
    static void Main(string[] args)
    {

        int N = GetInputInt();
        int[] A = GetInputsInt();

        for(int i = 0; i < N-2; i++)
        {
            for (int j = i+1; j < N-1; j++)
            {
                for (int l = j+1; l < N; l++)
                {
                    if((A[i] ^ A[j]) == A[l])
                    {
                        int w = A[j+1];
                        A[j + 1] = A[l];
                        A[l] = w;
                        break;
                    }
                }
                if((A[i] ^ A[j]) != A[j + 1])
                {
                    Console.WriteLine("No");
                    return;
                }
            } 
        }
        Console.WriteLine("Yes");
    }

    public static int GetInputInt()
    {
        return int.Parse(Console.ReadLine());
    }
    public static int[] GetInputsInt()
    {
        return Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
    }
    public static List<int> GetInputsIntList()
    {
        return Console.ReadLine().Split(' ').Select(int.Parse).ToList();
    }
}
