Patricia is separating 16 soccer cards and 22 baseball cards into groups. Each group will have the same number of cards, and each group will have only one kind of sports card. What is the greatest number of cards she can put in each group? How many groups of each type will there be?