There are 144 boys and 132 girls in a class. These students are arranged in rows for prayer in such a way that each row has either boys or girls and every row has an equal number of students. Find the minimum number of rows in which all the students can be arranged