Scanf.scanf "%d %d" (fun n k ->
    let a = Array.init n (fun _ -> Scanf.scanf " %d" (fun a -> a)) in
    let module S = Set.Make (struct type t = int let compare = compare end) in

    let rec loop i acc set =
        if i = n then false else
            let acc = acc lxor a.(i) in
            if S.mem (acc lxor k) set then true else
                loop (i + 1) acc (S.add acc set)
    in
    print_endline @@ if loop 0 0 (S.singleton 0) then "Yes" else "No"
)