Binary search on the diagonal