Avoid chaining nontransitive comparisons. Use `and` instead.