import strutils, sequtils, tables, algorithm

proc main() =
  let n = stdin.readLine.strip.parseInt
  var a = stdin.readLine.strip.split.map(parseBiggestInt)

  a.sort(system.cmp)
  var seen = initTable[int64, bool]()
  for it in a:
    seen[it] = true
  if seen.len > 3:
    echo "No"
    return
  if seen.len == 1:
    if a.allIt(it == 0):
      echo "Yes"
    else:
      echo "No"
    return
  if seen.len == 2:
    if n mod 2 == 1:
      echo "No"
    elif a.allIt(it > 0):
      echo "No"
    elif n mod 4 == 0:
      echo "No"
    else:
      echo "Yes"
    return
  if seen.len == 3:
    var x: int64 = 0
    for k in seen.keys:
      x = x xor k
    if x == 0:
      echo "Yes"
    else:
      echo "No"

main()
