All the students in Class 4 and 3 can just form a square formation. If the square matrix is reduced by 3 rows, and the students in these 3 rows are arranged in the remaining rows, the remaining rows can be increased by 6 people. How many students are there in Class 4 and Class 3?
四3班的全体同学正好可以排成一个方阵．若将这个方阵减少3行，这3行的学生排到其余各行，可以使其余各行都增加6人．四3班共有学生多少人．
<gadget id="calculator">6 * 3</gadget>
<output>18</output>

<gadget id="calculator">6 - 3</gadget>
<output>3</output>

<gadget id="calculator">18 / 3</gadget>
<output>6</output>

<gadget id="calculator">6 * 6</gadget>
<output>36</output>

<result>36</result>