using System;
using static System.Console;
using System.Linq;
using System.Collections.Generic;

class Program
{
    static int NN => int.Parse(ReadLine());
    static int[] NList => ReadLine().Split().Select(int.Parse).ToArray();
    static int[] NMi => ReadLine().Split().Select(c => int.Parse(c) - 1).ToArray();
    static int[][] NMap(int n) => Enumerable.Repeat(0, n).Select(_ => NMi).ToArray();
    public static void Main()
    {
        Solve();
    }
    static void Solve()
    {
        var n = NN;
        var a = NList;
        WriteLine(Xor(n, a) ? "Yes" : "No");
    }
    static bool Xor(int n, int[] a)
    {
        var all = a.Aggregate((x, ai) => x ^ ai);
        if (all != 0) return false;
        if (n == 2 && a[0] != 0) return false;
        var set = new HashSet<int>(a);
        if (set.Count < n) return true;
        var dp1 = new bool[8192];
        dp1[a[0]] = true;
        var dp2 = new bool[8192];
        for (var i = 1; i < n; ++i)
        {
            var ndp1 = new bool[8192];
            var ndp2 = new bool[8192];
            for (var b = 0; b < dp1.Length; ++b)
            {
                ndp1[b ^ a[i]] |= dp1[b];
                ndp2[b] |= dp1[b];
                ndp2[b ^ a[i]] |= dp2[b];
                ndp2[b] |= dp2[b];
            }
            dp1 = ndp1;
            dp2 = ndp2;
        }
        return dp2[0];
    }
}