#C5102. Least Common Multiple of Pairs

    ID: 48715 Type: Default 1000ms 256MiB

Least Common Multiple of Pairs

Least Common Multiple of Pairs

Given T test cases, each containing two integers \(a\) and \(b\), your task is to compute the least common multiple (LCM) for each pair. The LCM of two numbers is defined as:

\[ \text{LCM}(a, b) = \frac{|a \times b|}{\gcd(a, b)} \]

where \(\gcd(a, b)\) denotes the greatest common divisor of \(a\) and \(b\). Output the result for each test case on a separate line.

inputFormat

The first line contains an integer \(T\) (\(1 \leq T \leq 10^5\)) representing the number of test cases. Each of the following \(T\) lines contains two space-separated integers \(a\) and \(b\) (\(1 \leq a, b \leq 10^9\)).

outputFormat

For each test case, output a single line containing the least common multiple of the given pair of integers.

## sample
3
5 10
7 3
9 6
10

21 18

</p>