21. A school has six elementary school grades, with 8 classes in each grade; three junior high school grades, with 8 classes in each grade; and three senior high school grades, with 12 classes in each grade. Now, 27 classes are to be selected for a survey, ensuring that the proportion of classes selected from each type is the same. Therefore, from the elementary school, $\qquad$ classes should be selected from each grade, and from the junior high school, $\qquad$ classes should be selected from each grade.
Three, 21.2, 2.
Using stratified sampling.
The ratio of the number of classes in primary, junior high, and senior high school in the school is
$$
48: 24: 36=4: 2: 3 \text {, }
$$

Then, 12 classes are sampled from primary school, $27 \times \frac{4}{9}=12$ classes, distributed to six grades, with 2 classes sampled from each grade; 6 classes are sampled from junior high school, $27 \times \frac{2}{9}=6$ classes, distributed to three grades, with 2 classes sampled from each grade.