module IntSet = Set.Make (struct
  type t = int
  let compare = compare
end)

let () = Scanf.scanf "%d\n" @@ fun n ->
  let a :: as_ =
    Array.to_list @@
    Array.init n @@ fun _ -> Scanf.scanf "%d " @@ fun a -> a in
  print_endline @@
  if
    let s = IntSet.of_list as_ in
    List.exists (fun a' ->
      let rec solve s a1 a2 = function
        | 0 -> a2 = a
        | n -> IntSet.mem a2 s && solve (IntSet.remove a2 s) a2 (a1 lxor a2) (n - 1) in
      solve s a a' (n - 1)) as_
  then "Yes"
  else "No"
