Let A, B be matrices in having trace greater than or equal to 2. Assume the pair A, B is coherently oriented, that is, can be conjugated to a pair having nonnegative entries. Assume also that either A, B−1 is coherently oriented as well, or A, B have integer entries. Then the Lagarias–Wang finiteness conjecture holds for the set {A, B}, with optimal product in {A, B, AB, A2B, AB2}. In particular, it holds for every pair of 2 × 2 matrices with nonnegative integer entries and determinant 1.