USING: io io.files io.encodings.utf8 kernel command-line ascii sequences splitting assocs sets math math.parser formatting locals ; H{ } clone (command-line) second utf8 [ readln string>number [ readln " " split [ empty? not ] filter first2 string>number [ readln 2over swap push-at ] times drop ] times ] with-file-reader [let V{ } clone :> liars! V{ } clone :> nonliars! [ 2dup [ liars member? ] dip nonliars intersect empty? not or [ nonliars append nonliars! liars swap suffix liars! ] [ liars append liars! nonliars swap suffix nonliars! ] if ] assoc-each liars nonliars [ members length ] bi@ 2dup > [ swap ] unless "%d %d\n" printf ]