import sys
from collections import Counter

sys.setrecursionlimit(10 ** 7)
f_inf = float('inf')
mod = 10 ** 9 + 7


def resolve():
    n = int(input())
    A = list(map(int, input().split()))
    flg = False
    if len(set(A)) == 1 and 0 in set(A):
        flg = True
    else:
        if n % 2 == 0:
            D = Counter(A)
            if D[0] == n // 2 and len(D) == 2:
                flg = True
        if n % 3 == 0:
            D = Counter(A)
            if len(D) == 3:
                t = 0
                V = set()
                for k, v in D.items():
                    t ^= k
                    V.add(v)
                if len(V) == 1 and t == 0:
                    flg = True
    print("Yes" if flg else "No")


if __name__ == '__main__':
    resolve()
