let
both_sides p (a, b, _) = p a
&&
p b