using System;
using System.Text;
using System.Collections.Generic;
using System.Collections;
using System.Linq;
using E = System.Linq.Enumerable;
using System.IO.Pipes;
using System.Threading;

class Program
{
    static char[] abc = "abcdefghijklmnopqrstuvwxyz".ToCharArray();
    static long mod = 1000000007;
    static void Main(string[] args)
    {
        //var S = Console.ReadLine();
        //var N = long.Parse(Console.ReadLine());
        var N = long.Parse(Console.ReadLine());
        var A = Console.ReadLine().Split(' ').Select(x => long.Parse(x)).ToArray();
        Array.Sort(A);
        var ans = true;
        for (int i = 0; i < N; i++)
        {
            var one = A[i];
            var two = A[(i+1)%N];
            var thr = A[(i+2)%N];

            var sum = one ^ two ^ thr;
            if(sum != 0)
            {
                ans = false;
            }
        }
        Console.WriteLine(ans?"Yes":"No");

    }

}