Chef was bored staying at home in the lockdown. He wanted to go out for a change. Chef and Chefu are fond of eating Cakes,so they decided to go the Cake shop where cakes of all possible price are available .
They decided to purchase cakes of equal price and each of them will pay for their cakes. Chef only has coins of denomination $N$ whereas Chefu has that of denomination $M$.
So they want your help to find out the minimum amount to be spent in order to purchase the cakes.

-----Input:-----
- First line will contain $T$, number of testcases. Then the testcases follow. 
- Each testcase contains of a single line of input, two integers $N, M$. 

-----Output:-----
For each testcase, output in a single line answer the minimum amount to be spent in order to purchase the cake.

-----Constraints-----
- $1 \leq T \leq 1000$
- $2 \leq N,M \leq 10^7$

-----Sample Input:-----
1
2 3

-----Sample Output:-----
6

Difficulty: UNKNOWN_DIFFICULTY

Solutions:
import math
T = int(input())
for i in range(T):
	a = list(map(int, input().split()))
	n = a[0]
	m = a[1]
	print(m * n // math.gcd(m, n))


def compute_gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x

def compute_lcm(x, y):
	lcm = x * y // compute_gcd(x, y)
	return lcm
for _ in range(int(input())):
	a = [int(i) for i in input().split()]
	print(compute_lcm(a[0], a[1]))


def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)

def lcm(a, b):
	return a * b / gcd(a, b)
for _ in range(int(input())):
	(n, m) = list(map(int, input().split()))
	print(int(lcm(n, m)))


from math import gcd
t = int(input())
for _ in range(t):
	(n, m) = map(int, input().split())
	if n % m == 0 or m % n == 0:
		print(max(m, n))
	else:
		g = max(n, m)
		great = g
		while True:
			if great % n == 0 and great % m == 0:
				break
			else:
				great += g
		print(great)


def gcd(a, b):
	if min(a, b) == 0:
		return max(a, b)
	a_1 = max(a, b) % min(a, b)
	return gcd(a_1, min(a, b))

def lcm(a, b):
	return a * b // gcd(a, b)
for test in range(int(input())):
	(n, m) = map(int, input().split())
	print(lcm(n, m))


t = int(input())

def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)

def lcm(a, b):
	return a * b // gcd(a, b)
for i in range(t):
	(n, m) = map(int, input().split())
	print(lcm(n, m))


def compute_gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x

def cm(x, y):
	lcm = x * y // compute_gcd(x, y)
	return lcm
for _ in range(int(input())):
	(n, m) = map(int, input().split())
	print(cm(n, m))


def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)

def lcm(a, b):
	return a * b / gcd(a, b)
t = int(input())
for _ in range(t):
	(a, b) = map(int, input().split())
	print(int(lcm(a, b)))


from math import gcd
for i in range(int(input())):
	(a, b) = map(int, input().split())
	c = a * b
	d = gcd(a, b)
	print(c // d)


def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)
T = int(input())
while T:
	l = [int(k) for k in input().split()]
	print(int(l[0] * l[1] / gcd(l[0], l[1])))
	T -= 1


def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)
t = int(input())
while t:
	(n, m) = input().split()
	n = int(n)
	m = int(m)
	lcm = n * m / gcd(n, m)
	print(int(lcm))
	t -= 1


def hcf(x, y):
	if x > y:
		s = y
	else:
		s = x
	for i in range(1, s + 1):
		if x % i == 0 and y % i == 0:
			hcf = i
	return hcf
T = int(input())
for i in range(T):
	(n, m) = list(map(int, input().split()))
	h = hcf(n, m)
	l = m * n
	print(l // h)


from sys import stdin
from math import ceil, gcd

def func():
	return
for _ in range(int(stdin.readline())):
	(n, m) = list(map(int, stdin.readline().split()))
	print(n * m // gcd(n, m))


from math import gcd

def lcm(a, b):
	return int(a * b / gcd(a, b))
t = int(input())
while t != 0:
	(n, m) = list(map(int, input().split()))
	ans = lcm(n, m)
	print(ans)
	t = t - 1


from math import gcd

def cakes(a, b):
	print(int(a * b / gcd(a, b)))
for _ in range(int(input())):
	cakes(*list(map(int, input().split())))


import math
for _ in range(int(input())):
	(n, m) = list(map(int, input().split()))
	val1 = n * m
	val2 = math.gcd(n, m)
	print(val1 // val2)


import sys

def LCM(a, b):
	lar = max(a, b)
	small = min(a, b)
	i = lar
	while 1:
		if i % small == 0:
			return i
		i += lar
for _ in range(int(input())):
	(M, N) = map(int, input().split())
	print(LCM(M, N))