#abc142d. [abc142_d]Disjoint Set of Common Divisors

[abc142_d]Disjoint Set of Common Divisors

给你两个数A和B,寻找能同时整除两个数,且两两互质的数的个数。