Let GCD(A, B) be the greatest common divisor of two natural numbers A and B, and let LCM(A, B) be their least common multiple. If A and B are coprime then GCD(A, B) = 1, and in that case LCM(A, B) = A×B.
Given a natural number N, several coprime pairs (A, B) can satisfy LCM(A, B) = N. For N = 30 there are four of them: (1, 30), (2, 15), (3, 10), (5, 6). Two pairs that differ only in order count as the same pair.
Count the coprime pairs of natural numbers whose least common multiple is N.