Partition of rectangle