fun main(args: Array<String>) {
    val n = readInputLine().toInt()
    val aList = readInputLine().split(" ").map { it.toInt() }.toList().sorted()
    
    for ((i, a) in aList.withIndex()) {
        if (aList[(i - 1 + n) % n] xor aList[(i + 1) % n] != a) {
            println("No")
            return
        }
    }

    println("Yes")
}

fun readInputLine(): String {
    return readLine()!!
}
