 The Chinese remainder theorem can be generalized to any commutative ring, using coprime ideals.Given two randomly chosen integers "a" and "b", it is reasonable to ask how likely it is that "a" and "b" are coprime.In this determination, it is convenient to use the characterization that "a" and "b" are coprime if and only if no prime number divides both of them (see Fundamental theorem of arithmetic).