$/=get; $_=([X] (get.words xx 2)>>.permutations).map({ $!=([Z] $_).map({[>] $_}).sum; $! > $/-$! }); say @$_.grep(?*)/$_