import java.util.*
fun main(args: Array<String>) {
    val N  = nextInt()
    val A = listOfInt()
    val AS = HashSet<Int>(); AS.addAll(A)
    val M = mutableListOf<Pair<Int, Int>>()
    for (n in 0 until N-1) {
        for (m in n+1 until N) {
            if ((A[n] xor A[m]) !in AS) continue
            M.add(Pair(n, m))
        }
    }
//printErr("M.count:${M.count()}")
    if (M.count() >= N) println("Yes")
    else println("No")
}
fun next() = readLine()!!
fun nextInt() = Integer.parseInt(next())
fun listOfString() = next().split(" ")
fun listOfInt() = listOfString().map { Integer.parseInt(it) }
fun printErr(value: Any) { System.err.println(value) }
