import sys
import collections


def solve():
    readline = sys.stdin.buffer.readline
    mod = 10 ** 9 + 7
    n = int(readline())
    a = list(map(int, readline().split()))
    a = collections.Counter(a).most_common()
    if len(a) == 1:
        if a[0][1] == 0:
            print("Yes")
        else:
            print("No")
    elif len(a) == 2:
        if a[0][1] == a[1][1] * 2 and a[1][0] == 0:
            print("Yes")
        else:
            print("No")
    elif len(a) == 3:
        if a[0][0] ^ a[1][0] ^ a[2][0] == 0 and a[0][1] == a[1][1] == a[2][1]:
            print("Yes")
        else:
            print("No")
    else:
        print("No")


if __name__ == '__main__':
    solve()
