10.8. On a plane, a square is drawn, with its sides horizontal and vertical. Several segments parallel to the sides are drawn inside it, such that no two segments lie on the same line and do not intersect at a point that is internal for both segments. It turns out that the segments divide the square into rectangles, and any vertical line intersecting the square and not containing segments of the partition intersects exactly $k$ rectangles of the partition, while any horizontal line intersecting the square and not containing segments of the partition intersects exactly $\ell$ rectangles. What could be the number of rectangles in the partition?