CC -> columnsPerPage, RR -> primesPerColumn