Buggy python submission (verdict: Runtime Error):
import collections
n = int(input())
a = [int(i) for i in input().split()]
b = collections.Counter(a)
ans = "No"
if (len(b) == 3):
    if (list(b.keys())[0] ^ list(b.keys())[1] ^ list(b.keys())[2]) == 0:
        if ((list(b.values())[0] == list(b.values())[1]) & (list(b.values())[0] == list(b.values())[2])):
            ans = "Yes"
        else:
            ans = "No"
    else:
        ans = "No"
elif (len(b) == 1):
    if list(k.keys())[0] == 0:
        ans = "Yes"
    else:
        ans = "No"
elif (len(b) == 2):
    if n % 3 == 0:
        dd = list(b.keys())
        dd.sort()
        if (dd[0] == 0) & ((b[0] * 2) == (b[1])):
            ans = "Yes"
        else:
            ans = "No"
    else:
        ans = "No"
else:
    ans = "No"
print(ans)

Fixed submission:
import collections
n = int(input())
a = [int(i) for i in input().split()]
b = collections.Counter(a)
ans = "No"
if (len(b) == 3):
    if (list(b.keys())[0] ^ list(b.keys())[1] ^ list(b.keys())[2]) == 0:
        if ((list(b.values())[0] == list(b.values())[1]) & (list(b.values())[0] == list(b.values())[2])):
            ans = "Yes"
elif (len(b) == 1):
    if list(b.keys())[0] == 0:
        ans = "Yes"
elif (len(b) == 2):
    if (n % 3 == 0):
        dd = list(b.keys())
        dd.sort()
        if (dd[0] == 0) & ((b[0] * 2) == (b[dd[1]])):
            ans = "Yes"
print(ans)

Buggy python submission (verdict: Runtime Error):
import collections
n = int(input())
a = [int(i) for i in input().split()]
b = collections.Counter(a)
ans = "No"
if (len(b) == 3):
    if (list(b.keys())[0] ^ list(b.keys())[1] ^ list(b.keys())[2]) == 0:
        if ((list(b.values())[0] == list(b.values())[1]) & (list(b.values())[0] == list(b.values())[2])):
            ans = "Yes"
elif (len(b) == 1):
    if list(k.keys())[0] == 0:
        ans = "Yes"
elif (len(b) == 2):
    if n % 3 == 0:
        dd = list(b.keys())
        dd.sort()
        if (dd[0] == 0) & ((b[0] * 2) == (b[1])):
            ans = "Yes"
print(ans)

Fixed submission:
import collections
n = int(input())
a = [int(i) for i in input().split()]
b = collections.Counter(a)
ans = "No"
if (len(b) == 3):
    if (list(b.keys())[0] ^ list(b.keys())[1] ^ list(b.keys())[2]) == 0:
        if ((list(b.values())[0] == list(b.values())[1]) & (list(b.values())[0] == list(b.values())[2])):
            ans = "Yes"
elif (len(b) == 1):
    if list(b.keys())[0] == 0:
        ans = "Yes"
elif (len(b) == 2):
    if (n % 3 == 0):
        dd = list(b.keys())
        dd.sort()
        if (dd[0] == 0) & ((b[0] * 2) == (b[dd[1]])):
            ans = "Yes"
print(ans)

Buggy python submission (verdict: Runtime Error):
import collections
n = int(input())
a = [int(i) for i in input().split()]
b = collections.Counter(a)
ans = "No"
if (len(b) == 3):
    if (list(b.keys())[0] ^ list(b.keys())[1] ^ list(b.keys())[2]) == 0:
        ans = "Yes"
elif (len(b) == 1):
    if list(k.keys())[0] == 0:
        ans = "Yes"
else:
    continue
print(ans)

Fixed submission:
import collections
n = int(input())
a = [int(i) for i in input().split()]
b = collections.Counter(a)
ans = "No"
if (len(b) == 3):
    if (list(b.keys())[0] ^ list(b.keys())[1] ^ list(b.keys())[2]) == 0:
        if ((list(b.values())[0] == list(b.values())[1]) & (list(b.values())[0] == list(b.values())[2])):
            ans = "Yes"
elif (len(b) == 1):
    if list(b.keys())[0] == 0:
        ans = "Yes"
elif (len(b) == 2):
    if (n % 3 == 0):
        dd = list(b.keys())
        dd.sort()
        if (dd[0] == 0) & ((b[0] * 2) == (b[dd[1]])):
            ans = "Yes"
print(ans)

Buggy python submission (verdict: Runtime Error):
import collections
n = int(input())
a = [int(i) for i in input().split()]
b = collections.Counter(a)
ans = "No"
if (len(b) == 3):
    if (list(b.keys())[0] ^ list(b.keys())[1] ^ list(b.keys())[2]) == 0:
        ans = "Yes"
elif (len(b) == 1):
    if list(k.keys())[0] == 0:
        ans = "Yes"
print(ans)

Fixed submission:
import collections
n = int(input())
a = [int(i) for i in input().split()]
b = collections.Counter(a)
ans = "No"
if (len(b) == 3):
    if (list(b.keys())[0] ^ list(b.keys())[1] ^ list(b.keys())[2]) == 0:
        if ((list(b.values())[0] == list(b.values())[1]) & (list(b.values())[0] == list(b.values())[2])):
            ans = "Yes"
elif (len(b) == 1):
    if list(b.keys())[0] == 0:
        ans = "Yes"
elif (len(b) == 2):
    if (n % 3 == 0):
        dd = list(b.keys())
        dd.sort()
        if (dd[0] == 0) & ((b[0] * 2) == (b[dd[1]])):
            ans = "Yes"
print(ans)