Problem 2427 · Easy
Every common factor is at most the smaller of the two numbers, so test each candidate up to that bound.
Open the interactive visualisation