# coding: utf-8

N = int(eval(input()))

A = list(map(int, input().split()))

A.sort()

d = {}

for i in range(N):

    a = A[i]

    if a not in list(d.keys()):

        d[a] = 1

    else:

        d[a] += 1

if len(list(d.keys())) == 1:

    if list(d.keys())[0] == 0:

        print("Yes")

    else:

        print("No")

elif len(list(d.keys())) == 2:

    keys = list(sorted(list(d.keys())))

    if d[keys[0]] == N // 3:

        print("Yes")

    else:

        print("No")

elif len(list(d.keys())) == 3:

    keys = list(d.keys())

    if keys[0] ^ keys[1] ^ keys[2] == 0:

        if d[keys[0]] == d[keys[1]] == d[keys[2]]:

            print("Yes")

        else:

            print("No")

    else:

        print("No")

else:

    print("No")
# coding: utf-8

N = int(eval(input()))

A = list(map(int, input().split()))

# A.sort()

d = {}

for i in range(N):

    a = A[i]

    if a not in list(d.keys()):

        d[a] = 1

    else:

        d[a] += 1

flag = True

if len(list(d.keys())) == 1:

    if list(d.keys())[0] == 0:

        flag = True

    else:

        flag = False

elif len(list(d.keys())) == 2:

    keys = list(sorted(list(d.keys())))

    if d[keys[0]] == N // 3:

        flag = True

    else:

        flag = False

elif len(list(d.keys())) == 3:

    keys = list(d.keys())

    if keys[0] ^ keys[1] ^ keys[2] == 0:

        if d[keys[0]] == d[keys[1]] == d[keys[2]]:

            flag = True

        else:

            flag = False

    else:

        flag = False

else:

    flag = False

print(("Yes" if flag else "No"))
# coding: utf-8
N = int(eval(input()))
A = list(map(int, input().split()))
A.sort()
d = {}
for i in range(N):
    a = A[i]
    if a not in list(d.keys()):
        d[a] = 1
    else:
        d[a] += 1
if len(list(d.keys())) == 1:
    if list(d.keys())[0] == 0:
        print("Yes")
    else:
        print("No")
elif len(list(d.keys())) == 2:
    keys = list(sorted(list(d.keys())))
    if d[keys[0]] == N // 3:
        print("Yes")
    else:
        print("No")
elif len(list(d.keys())) == 3:
    keys = list(d.keys())
    if keys[0] ^ keys[1] ^ keys[2] == 0:
        if d[keys[0]] == d[keys[1]] == d[keys[2]]:
            print("Yes")
        else:
            print("No")
    else:
        print("No")
else:
    print("No")

# coding: utf-8
N = int(eval(input()))
A = list(map(int, input().split()))
# A.sort()
d = {}
for i in range(N):
    a = A[i]
    if a not in list(d.keys()):
        d[a] = 1
    else:
        d[a] += 1
flag = True
if len(list(d.keys())) == 1:
    if list(d.keys())[0] == 0:
        flag = True
    else:
        flag = False
elif len(list(d.keys())) == 2:
    keys = list(sorted(list(d.keys())))
    if d[keys[0]] == N // 3:
        flag = True
    else:
        flag = False
elif len(list(d.keys())) == 3:
    keys = list(d.keys())
    if keys[0] ^ keys[1] ^ keys[2] == 0:
        if d[keys[0]] == d[keys[1]] == d[keys[2]]:
            flag = True
        else:
            flag = False
    else:
        flag = False
else:
    flag = False
print(("Yes" if flag else "No"))

-A.sort() +# A.sort() +flag = True -        print("Yes") +        flag = True -        print("No") +        flag = False -        print("Yes") +        flag = True -        print("No") +        flag = False -            print("Yes") +            flag = True -            print("No") +            flag = False -        print("No") +        flag = False -    print("No") +    flag = False +print(("Yes" if flag else "No"))