using System;
using System.Collections.Generic;
using System.Linq;

namespace test
{
    class Program
    {
        static void Main(string[] args)
        {
            var N = ReadInt();
            var a = ReadArrayInt();
            var cnt = a.Distinct().Count();
            var even = a.Distinct().Where(i => i % 2 == 0).ToArray();
            var odd= a.Distinct().Where(i => i % 2 != 0).ToArray();
            if (cnt != 3 || even.Count() != 1 || odd.Count() != 2) { Console.WriteLine("No"); return; }
            var evenCnt = a.Count(i => i == even[0]);
            var odd1Cnt = a.Count(i => i == odd[0]);
            var odd2Cnt = a.Count(i => i == odd[1]);
            if (!(evenCnt == odd1Cnt && odd1Cnt == odd2Cnt)) { Console.WriteLine("No"); return; }
            if ((odd[0] ^ odd[1]) != even[0]) { Console.WriteLine("No"); return; }

            Console.WriteLine("Yes");
            Console.ReadLine();
        }

        static string Read() { return Console.ReadLine(); }
        static int ReadInt() { return int.Parse(Read()); }
        static long ReadLong() { return long.Parse(Read()); }
        static int[] ReadArrayInt() { return Read().Split(' ').Select(s => int.Parse(s)).ToArray(); }
        static long[] ReadArrayLong() { return Read().Split(' ').Select(s => long.Parse(s)).ToArray(); }
    }
}