#--------------------------------------------------
import times, strutils, sequtils, math, algorithm, tables, sets, lists, intsets, critbits, future
template `max=`(x,y) = x = max(x,y)
template `min=`(x,y) = x = min(x,y)
let read* = iterator: string {.closure.} =
    while true: (for s in stdin.readLine.split: yield s)
proc scan(): int = read().parseInt
proc toInt(c:char): int =
    return int(c) - int('0')
const MOD = 10^9+7
proc dec(t:var CountTable[int], key:int): void =
    if t.hasKey(key):
        t[key] = t[key] - 1
#--------------------------------------------------
var n = scan()
var a = newSeqWith(n, scan())
a.sort
var ta = a.toCountTable
var can = -1#newSeq[int]()
var res = @[a[0]]
ta[a[0]] = ta[a[0]] - 1
for i in 1..a.high:
    if (a[0] xor a[i]) in ta:
        can = i
        res.add(a[i])
        ta.dec(a[i])
        break
if can == -1:
    echo "No"
    quit()
var ans = true
for i in 2..a.high:
    let t = res[^1] xor res[^2]
    if t notin ta:
        ans = false
        break
    else:
        ta.dec(t)
        res.add(t)

echo(if ans: "Yes" else: "No")