So the first group: 31= 31; 35=5*7; 40=2*2*2*5; 15=3*5; 17= 17; 20=2*2*5; 8=2*2*2; 10=2*5; 1 1= 1 1; 5=5; 6=2*3; 7=7;
The number we take is 2*2*2 (because each number is only multiplied by three twos at most, and so are the others) *3*5*7=840. We may ask why we don't continue to multiply by 1 1,17,31. If you continue to multiply, this number will be very large, and
So in the first group, we can choose 40,40 * 21= 840, which satisfies the condition (of course, it can also be 8,8 *105 = 840, and there can be many solutions).
Other groups are the same as above