Buggy python submission (verdict: Runtime Error):
size = int(input())
nums = list(map(int, input().split()))

# size = 3
# nums = [1, 2, 3]

numu = list(set(nums))
if len(numu) == 1 and numu[0] == 0:
  print("Yes")
  quit()

if len(numu) == 2 and nums.count(0) == 1 \
    and nums.count(0) * 3 == size:
  print("Yes")
  quit()

if not nums.count(numu[0]) == nums.count(numu[1]) == nums.count(numu[2]):
  print("No")
  quit()

if len(numu) == 3:
  if numu[0] ^ numu[2] == numu[1] \
      and numu[1] ^ numu[0] == numu[2] \
      and numu[2] ^ numu[1] == numu[0]:
    print("Yes")
    quit()

print("No")


Fixed submission:
size = int(input())
nums = list(map(int, input().split()))
# 
# size = 6
# nums = [0, 2, 2, 0, 2, 2]

numu = list(set(nums))
if len(numu) == 1 and numu[0] == 0:
  print("Yes")
  quit()


if len(numu) == 2 \
    and nums.count(0) != 0 \
    and nums.count(0) * 3 == size:
  print("Yes")
  quit()

if len(numu) == 3:
  if nums.count(0) == 1:
    print("No")
    quit()

  if not nums.count(numu[0]) == nums.count(numu[1]) == nums.count(numu[2]):
    print("No")
    quit()

  if numu[0] ^ numu[2] == numu[1] \
      and numu[1] ^ numu[0] == numu[2] \
      and numu[2] ^ numu[1] == numu[0]:
    print("Yes")
    quit()

print("No")

Buggy python submission (verdict: Runtime Error):
size = int(input())
nums = list(map(int, input().split()))

# size = 3
# nums = [0, 0, 0]

if size % 3 != 0:
  print("No")
  quit()

numu = list(set(nums))
if len(numu) == 1 and numu[0] == 0:
  print("Yes")
  quit()

if len(numu) == 2 and numu.count(0) > 0:
  print("Yes")
  quit()


num = nums.count(numu[0])
if nums.count(nums[1]) != num or nums.count(nums[2]) != num:
  print("No")
  quit()

if numu[0] ^ numu[2] == numu[1] \
    and numu[1] ^ numu[0] == numu[2] \
    and numu[2] ^ numu[1] == numu[0]:
  print("Yes")
  quit()

print("No")




Fixed submission:
size = int(input())
nums = list(map(int, input().split()))
# 
# size = 6
# nums = [0, 2, 2, 0, 2, 2]

numu = list(set(nums))
if len(numu) == 1 and numu[0] == 0:
  print("Yes")
  quit()


if len(numu) == 2 \
    and nums.count(0) != 0 \
    and nums.count(0) * 3 == size:
  print("Yes")
  quit()

if len(numu) == 3:
  if nums.count(0) == 1:
    print("No")
    quit()

  if not nums.count(numu[0]) == nums.count(numu[1]) == nums.count(numu[2]):
    print("No")
    quit()

  if numu[0] ^ numu[2] == numu[1] \
      and numu[1] ^ numu[0] == numu[2] \
      and numu[2] ^ numu[1] == numu[0]:
    print("Yes")
    quit()

print("No")

Buggy python submission (verdict: Runtime Error):
size = int(input())
nums = list(map(int, input().split()))

# size = 4
# nums = [1, 2, 3, 1, 2, 3]

numu = list(set(nums))
if size % 3 != 0:
  print("No")
  quit()

num = nums.count(numu[0])
if nums.count(nums[1]) != num or nums.count(nums[2]) != num:
  print("No")
  quit()

if numu[0] ^ numu[2] == numu[1] \
    and numu[1] ^ numu[0] == numu[2] \
    and numu[2] ^ numu[1] == numu[0]:
  print("Yes")
  quit()

print("No")


Fixed submission:
size = int(input())
nums = list(map(int, input().split()))
# 
# size = 6
# nums = [0, 2, 2, 0, 2, 2]

numu = list(set(nums))
if len(numu) == 1 and numu[0] == 0:
  print("Yes")
  quit()


if len(numu) == 2 \
    and nums.count(0) != 0 \
    and nums.count(0) * 3 == size:
  print("Yes")
  quit()

if len(numu) == 3:
  if nums.count(0) == 1:
    print("No")
    quit()

  if not nums.count(numu[0]) == nums.count(numu[1]) == nums.count(numu[2]):
    print("No")
    quit()

  if numu[0] ^ numu[2] == numu[1] \
      and numu[1] ^ numu[0] == numu[2] \
      and numu[2] ^ numu[1] == numu[0]:
    print("Yes")
    quit()

print("No")