Comparing common fractions with the same denominator or numerator