using System;

namespace question1
{
    class Program
    {
        static void Main(string[] args)
        {
            int flag = 1;
            int largeN;
            largeN = int.Parse(Console.ReadLine());
            string[] str = Console.ReadLine().Split(' ');
            int a = 0;
            int b = 0;
            int c =0;
            //本当に 3 種類か?
            foreach (string tempstr in str){
                int test = int.Parse(tempstr);
                if(test != a && test !=b && test!=c)
                {
                    if (a == 0) a = test;
                    else if (b == 0) b = test;
                    else if (c == 0) c = test;
                    else
                    {
                        flag = 0;
                        //Console.WriteLine("No");
                        //Environment.Exit(0);
                    }
                }
            }

            //Console.WriteLine(a^b^c);
            if (0 == (a ^ b ^ c)) flag = 1;// Console.WriteLine("Yes");
            else flag = 0; //Console.WriteLine("No");

            if (flag == 1) Console.WriteLine("Yes");
            else Console.WriteLine("No");


            //Console.ReadLine();
            
        }
    }
}