https://www.acmicpc.net/problem/1934
#include <bits/stdc++.h>
using namespace std;
//최소공배수
int gcd(int a, int b) {
while (b != 0) {
int last = a % b;
a = b;
b = last;
}
return a;
}
int main() {
int t, a, b;
cin >> t;
while (t--) {
cin >> a >> b;
int g = gcd(a, b);
printf("%d\n", (a*b)/g);
}
}