If both numbers are composite numbers, we can first decompose the two numbers into prime factors respectively, and then see whether the two numbers contain the same prime factors. If not, these two numbers are prime numbers. If the difference between two numbers is not big, we can find their difference first, and then see if the difference and the smaller number are coprime. If it is coprime, then the original two numbers must be coprime. Divide a large number by a decimal. If the remainder is coprime with the smaller number, the original two numbers are coprime.