A * B = GCD(A, B) * LCM(A, B)
import java.util.Scanner; public class Main { public static void main(String[] args) throws Exception { // Input Supply Cable Scanner sc = new Scanner(System.in); int T = sc.nextInt(); for (int i = 0; i < T; i++) { // Preprocessing int A = sc.nextInt(); int B = sc.nextInt(); // Operating LCM int result = A*B / GCD(Math.max(A, B), Math.min(A, B)); // Output Extracting Cable System.out.println(res..