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

namespace AtCorder
{
	public class Program
	{
		const long MOD = 1000000007;
		static void Main(string[] args)
		{
			Scanner cin = new Scanner();
			long n = cin.Long();
			long[] a = new long[n];
			for (int i = 0; i < n; i++) {
				a[i] = cin.Long();
			}

			long[] nums = new long[1000000001];
			for (int i = 0; i < n; i++) {
				nums[a[i]]++;
			}

			var av = nums
				.Select((x, index) => new Tuple<long, long>(index, x))
				.Where(x => x.Item2 > 0)
				.ToList();
			if (av.Count == 1) {
				if (av[0].Item1 == 0) {
					Console.WriteLine("Yes");
				} else {
					Console.WriteLine("No");
				}
			} else if (av.Count == 2) {
				if (av[0].Item2 == av[1].Item2 * 2) {
					if (av[1].Item1 == 0 && ((av[0].Item1 ^ av[0].Item1) == 0)) {
						Console.WriteLine("Yes");
					} else {
						Console.WriteLine("No");
					}
				} else if (av[0].Item2 * 2 == av[1].Item2) {
					if (av[0].Item1 == 0 && ((av[1].Item1 ^ av[1].Item1) == 0)) {
						Console.WriteLine("Yes");
					} else {
						Console.WriteLine("No");
					}
				} else {
					Console.WriteLine("No");
				}
			} else if (av.Count == 3) {
				if (av[0].Item2 == av[1].Item2
					&& av[1].Item2 == av[2].Item2
					&& ((av[0].Item1 ^ av[1].Item1 ^ av[2].Item1) == 0)) {
					Console.WriteLine("Yes");
				} else {
					Console.WriteLine("No");
				}
			} else {
				Console.WriteLine("No");
			}
		}
	}

	public class Scanner
	{
		private readonly char[] delimiter_ = new char[] { ' ' };
		private string[] buf_;
		private int index_;
		
		public Scanner()
		{
			buf_ = new string[0];
			index_ = 0;
		}

		public string Next()
		{
			if (index_ < buf_.Length) {
				return buf_[index_++];
			}

			string st = Console.ReadLine();
			while (st == "") {
				st = Console.ReadLine();
			}

			buf_ = st.Split(delimiter_, StringSplitOptions.RemoveEmptyEntries);
			if (buf_.Length == 0) {
				return Next();
			}

			index_ = 0;
			return buf_[index_++];
		}

		public int Int()
		{
			return int.Parse(Next());
		}
		public int[] ArrayInt(int N, int add = 0)
		{
			int[] Array = new int[N];
			for (int i = 0; i < N; i++) {
				Array[i] = Int() + add;
			}
			return Array;
		}

		public long Long()
		{
			return long.Parse(Next());
		}

		public long[] ArrayLong(int N, long add = 0)
		{
			long[] Array = new long[N];
			for (int i = 0; i < N; i++) {
				Array[i] = Long() + add;
			}
			return Array;
		}

		public double Double()
		{
			return double.Parse(Next());
		}

		public double[] ArrayDouble(int N, double add = 0)
		{
			double[] Array = new double[N];
			for (int i = 0; i < N; i++) {
				Array[i] = Double() + add;
			}
			return Array;
		}
	}
}
