using System;
using System.Collections.Generic;
using System.Linq;
public class ABG035A {
    public static void Main() {
        int N, sum = 0;
        List<int> a = new List<int>();
        N = int.Parse(Console.ReadLine());
        string[] str = Console.ReadLine().Split(' ');
        for (int i = 0; i < N; i++) {
            a.Add(int.Parse(str[i]));
            sum ^= a[i];
        }

        if (sum == 0) {if(str.Distinct().Count()==1){Console.WriteLine("No");}else
          {Console.WriteLine("Yes");}
  
        }else {Console.WriteLine("N");}
    }
}