package main

import (
	"bufio"
	"fmt"
	"os"
	"sort"
)

func main() {
	N := ReadInt()
	a := ReadInts(N)
	b := make([]int, 0)
	m := make(map[int]int)
	for i := 0; i < N; i++ {
		if m[a[i]] == 0 {
			b = append(b, a[i])
		}
		m[a[i]]++
	}

	sort.Ints(b)

	if len(b) == 1 {
		if b[0] == 0 {
			fmt.Println("Yes")
		} else {
			fmt.Println("No")
		}
		return
	}

	if len(b) == 2 {
		if b[0] == 0 && m[b[0]]*3 == N {
			fmt.Println("Yes")
		} else {
			fmt.Println("No")
		}
		return
	}

	if N%3 != 0 {
		fmt.Println("No")
		return
	}

	s := 0
	for i := 0; i < len(b); i++ {
		s ^= b[i]
	}
	ok := true
	first := m[b[0]]
	for i := 1; i < len(b); i++ {
		if first != m[b[i]] {
			ok = false
		}
	}

	if s == 0 && ok {
		fmt.Println("Yes")
	} else {
		fmt.Println("No")
	}
}

var reader = bufio.NewReader(os.Stdin)

func Scan(a ...interface{}) {
	if _, err := fmt.Fscan(reader, a...); err != nil {
		panic(err)
	}
}
func ReadInt() (i int)       { Scan(&i); return }
func ReadString() (s string) { Scan(&s); return }
func ReadInts(n int) []int {
	v := make([]int, n)
	for i := 0; i < n; i++ {
		Scan(&v[i])
	}
	return v
}
