Find all positive pairs of integers a, b such that (a, b) = 12 and [a, b] = 360.
I used the formula [a, b] = ab/(a, b) and I got that ab = 4320.
From there I just listed all 48 factors of 4320 alongside the factor they correspond with. However, the pair 54 and 80 multiply to 4320 but their lcm is 2160, and not 360 as the problem asks. Is there a faster way to find out which pairs fit the criteria than testing them one by one?