Problem 2427 · Easy

Number of Common Factors

Every common factor is at most the smaller of the two numbers, so test each candidate up to that bound.

Open the interactive visualisation