class FractionReduction {
    static void main(String[] args) {
        for (int size = 2; size <= 5; size++) {
            reduce(size)
        }
    }

    private static void reduce(int numDigits) {
        System.out.printf("Fractions with digits of length%d where cancellation is valid.  Examples:%n", numDigits)