If the difference between two natural numbers is 2 and the sum of their greatest common divisor and least common multiple is 42, then the two natural numbers are

If the difference between two natural numbers is 2 and the sum of their greatest common divisor and least common multiple is 42, then the two natural numbers are

8,10
If the greatest common divisor is 1, then the least common multiple is 42-1 = 41, and the two numbers are 1 and 41 respectively, which is contradictory to the problem. Therefore, the greatest common divisor of two numbers can only be 2, and the least common multiple is 42-2 = 40, then the product of two numbers is 2 * 40 = 80,
If the difference between the two numbers is 2, then the large number should be 10 and the decimal is 8. In fact, the two numbers are exactly quadratic equations
X^2-2X+80=0
The two roots of x 1 = 8, x 2 = 10