Detect diagonals.