import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class FractionReduction {

    public 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);