import itertools


def main():
    N = int(input())
    A = list(map(int, input().split()))
    P = itertools.permutations(A)

    for v in P:
        if v[-2] ^ v[0] != v[-1]:
            continue
        for i in range(N - 1):
            if v[i - 1] ^ v[i + 1] == v[i]:
                continue
            else:
                break
        print("Yes")
        return
    print("No")
    return


if __name__ == "__main__":
    main()
