#!/usr/bin/env python3

import sys

sys.setrecursionlimit(10**7)

# Override `input` function because `stdin.readline()` is 10x faster than built-in `input()`
input = sys.stdin.readline


def read_h(typ=int):
    return list(map(typ, input().split()))


def read_v(n, m=1, typ=int):
    return [read_h(typ) if m > 1 else typ(input()) for _ in range(n)]


def main():
    n, = read_h()
    arr = sorted(read_h(), reverse=True)
    #  print(arr)

    cnts = {}
    for a in arr:
        cnts[a] = cnts.get(a, 0) + 1
    #  print(cnts)

    rem = sum(cnts.values())
    for i in range(n - 1):
        a = arr[i]
        if cnts[a] <= 0:
            continue

        cnts[a] -= 1
        rem -= 1
        if rem == 0:
            break

        tmp_rem = rem
        for j in range(i + 1, n):
            b = arr[j]
            if cnts[b] <= 0:
                continue

            xor = a ^ b
            if xor not in cnts or cnts[xor] <= 0:
                continue

            cnts[b] -= 1
            cnts[xor] -= 1
            rem -= 2
            #  print(a, b, xor)
            #  print('remain:', cnts)
            break

        if tmp_rem == rem:
            print('No')
            return

    print('Yes')


if __name__ == '__main__':
    main()
