$h{0}=<>; ++$h{$_}for glob<>; <>=~/\d+ -?/;$z=$&+$'; @g=grep$h{$z-$_}|$h{$_-$z}|$h{$z+$_},keys%h; print$z?@g?1+!grep!$_,@g:-1:0