Partitioning a Rectangle Into Rows and Columns