module IntMap = Map.Make(struct type t = int let compare = compare end)
let split_string ?(pattern=" ") = Str.split @@ Str.regexp pattern

let n = Scanf.sscanf (read_line ()) "%d" @@ fun n -> n
let a = read_line () |> split_string |> List.map int_of_string

let m = List.fold_left (fun map i -> IntMap.add i (try IntMap.find i map with Not_found -> 0) map) IntMap.empty a

let rec loop map a b = function
  | 0 -> true
  | n -> 
      let remove a s =
        match IntMap.find a s with
          | exception Not_found -> s
          | 1 -> IntMap.remove a s
          | n -> IntMap.add a (n - 1) s
      in
      IntMap.mem b map && loop (remove b map) b (a lxor b) (n - 1)

let () = print_endline @@ 
  if loop m (fst (IntMap.min_binding m)) (fst (IntMap.max_binding m)) n 
  then "Yes" else "No"