{-# LANGUAGE BangPatterns #-}
import Control.Monad
import Data.Maybe
import Debug.Trace
import Data.List
import qualified Data.Map.Strict as Map
import qualified Data.IntMap.Strict as IntMap
import qualified Data.Set as Set
import qualified Data.IntSet as IntSet
import Data.Functor
import Data.Array
-- import Data.Array.Unboxed
import Control.Monad.ST
import Data.Array.ST
import Data.Bits

main :: IO ()
main = do
  n <- readLn :: IO Int
  as <- map read . words <$> getLine :: IO [Int]
  putStrLn $ if solve n as then "Yes" else "No"

solve n as = any id [ True | a <- tail as, f ((head as):a:(delete a (tail as))) (Map.adjust (\y -> y-1) a mp) ]

  -- if odd n
  -- then odds
  -- else evens
  -- f as mp
  -- go as set
  where
    prod = foldl1' xor as
    n = length as
    odds = all (\a -> prod `xor` a == a) as
    evens = all (\a -> prod `xor` a == 0) as


    mp = toCountMap $ tail as
    f :: [Int] -> Map.Map Int Int -> Bool
    f (a:b:[]) _ = (a `xor` b) == (head as)
    f (a:b:bs) m
      | Map.member x m = if m Map.! x > 0 
          then f (b:bs) $ Map.adjust (\y -> y-1) x m
          else False
      | otherwise = False
      where x = (a `xor` b)

--     -- set = IntSet.delete (as!!1) . IntSet.delete (as!!0) $ IntSet.fromList as
--     -- go (a:b:[]) _ = (a `xor` b) == head as
--     -- go (a:b:as) s = if IntSet.member m s
--     --     then go (b:as) $ IntSet.delete m s
--     --     else False
--     --   where
--     --     m = a `xor` b


toCountMap :: (Ord k) => [k] -> Map.Map k Int
toCountMap = Map.fromListWith (+) . flip zip (repeat 1)
