{"trustable":true,"sections":[{"title":"","value":{"format":"MD","content":"Santosh has a farm at Byteland. He has a very big family to look after. His life takes a sudden turn and he runs into a financial crisis. After giving all the money he has in his hand, he decides to sell his plots. The speciality of his land is that it is rectangular in nature. Santosh comes to know that he will get more money if he sells square shaped plots. So keeping this in mind, he decides to **divide his land into minimum possible number of square plots**, such that each plot has the **same area**, and the **plots divide the land perfectly**. He does this in order to get the maximum profit out of this. \n\nSo your task is to **find the minimum number of square plots with the same area, that can be formed out of the rectangular land, such that they divide it perfectly.**\n"}},{"title":"Input Format","value":{"format":"MD","content":"- The first line of the input contains $T$, the number of test cases. Then $T$ lines follow.\n- The first and only line of each test case contains two space-separated integers, $N$ and $M$, the length and the breadth of the land, respectively.\n"}},{"title":"Output Format","value":{"format":"MD","content":"For each test case, print the minimum number of square plots with equal area, such that they divide the farm land perfectly, in a new line.\n"}},{"title":"Constraints","value":{"format":"MD","content":"$1 \\le T \\le 20$ \n$1 \\le M \\le 10000$ \n$1 \\le N \\le 10000$ \n"}},{"title":"Sample 1","value":{"format":"MD","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e2\n10 15\n4 6\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e6\n6\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}