{"trustable":false,"sections":[{"title":"","value":{"format":"HTML","content":"\u003ccenter\u003e\r\n\t\u003cp\u003e\r\n\t\t\u0026nbsp;\u003c/p\u003e\r\n\u003c/center\u003e\r\n\u003cp\u003e\r\n\tRecently \u003cspan class\u003d\"textit\"\u003e\u003cspan data-scayt_word\u003d\"Yaghoub\" data-scaytid\u003d\"14\"\u003eYaghoub\u003c/span\u003e\u003c/span\u003e is playing a new trick to sell some more. When somebody gives him \u003cspan class\u003d\"MATH\"\u003e\u003ci\u003eA\u003c/i\u003e\u003c/span\u003e \u003cspan data-scayt_word\u003d\"Tomans\" data-scaytid\u003d\"15\"\u003eTomans\u003c/span\u003e, he who never has appropriate changes, asks for \u003cspan class\u003d\"MATH\"\u003e\u003ci\u003eB\u003c/i\u003e\u003c/span\u003e \u003cspan data-scayt_word\u003d\"Tomans\" data-scaytid\u003d\"18\"\u003eTomans\u003c/span\u003e such that lowest common multiple of \u003cspan class\u003d\"MATH\"\u003e\u003ci\u003eA\u003c/i\u003e\u003c/span\u003e and \u003cspan class\u003d\"MATH\"\u003e\u003ci\u003eB\u003c/i\u003e\u003c/span\u003e equals to \u003cspan class\u003d\"MATH\"\u003e\u003ci\u003eC\u003c/i\u003e\u003c/span\u003e and he will pay back a round bill. Or otherwise take some snack instead of the remaining of his money. He believes that finding such a number is hard enough that dissuades students from paying that.\u003c/p\u003e\r\n\u003cp\u003e\r\n\tYou should write a program that help poor students giving the appropriate amount of money to \u003cspan data-scayt_word\u003d\"Yaghoub\" data-scaytid\u003d\"19\"\u003eYaghoub\u003c/span\u003e. Of course if there are several answers you go for students\u0026#39; benefit which is the lowest of them.\u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003e\r\n\tThe first line begin with an integer \u003cspan class\u003d\"MATH\"\u003e\u003ci\u003eT\u003c/i\u003e\u003c/span\u003e (\u003c!-- MATH\r\n $T \\le 100000$\r\n --\u003e\u003cspan class\u003d\"MATH\"\u003e\u003cspan data-scayt_word\u003d\"T100000\" data-scaytid\u003d\"1\"\u003e\u003ci\u003eT\u003c/i\u003e\u003cimg align\u003d\"MIDDLE\" alt\u003d\"$ \\le$\" border\u003d\"0\" height\u003d\"31\" src\u003d\"http://uva.onlinejudge.org/external/118/11889img1.png\" width\u003d\"18\" /\u003e100000\u003c/span\u003e\u003c/span\u003e), the number of tests. Each test that comes in a separate line contains two integers \u003cspan class\u003d\"MATH\"\u003e\u003ci\u003eA\u003c/i\u003e\u003c/span\u003e and \u003cspan class\u003d\"MATH\"\u003e\u003ci\u003eC\u003c/i\u003e\u003c/span\u003e (\u003c!-- MATH\r\n $1 \\le A, C \\le 10^7$\r\n --\u003e\u003cspan class\u003d\"MATH\"\u003e\u003cspan data-scayt_word\u003d\"1A\" data-scaytid\u003d\"12\"\u003e1\u003cimg align\u003d\"MIDDLE\" alt\u003d\"$ \\le$\" border\u003d\"0\" height\u003d\"31\" src\u003d\"http://uva.onlinejudge.org/external/118/11889img1.png\" width\u003d\"18\" /\u003e\u003ci\u003eA\u003c/i\u003e\u003c/span\u003e, \u003cspan data-scayt_word\u003d\"C107\" data-scaytid\u003d\"13\"\u003e\u003ci\u003eC\u003c/i\u003e\u003cimg align\u003d\"MIDDLE\" alt\u003d\"$ \\le$\" border\u003d\"0\" height\u003d\"31\" src\u003d\"http://uva.onlinejudge.org/external/118/11889img1.png\" width\u003d\"18\" /\u003e10\u003csup\u003e7\u003c/sup\u003e\u003c/span\u003e\u003c/span\u003e).\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003e\r\n\tPrint the lowest integer \u003cspan class\u003d\"MATH\"\u003e\u003ci\u003eB\u003c/i\u003e\u003c/span\u003e such that \u003c!-- MATH\r\n $LCM(A,B)\u003dC$\r\n --\u003e\u003cspan class\u003d\"MATH\"\u003e\u003ci\u003eLCM\u003c/i\u003e(\u003ci\u003eA\u003c/i\u003e, \u003ci\u003eB\u003c/i\u003e) \u003d \u003ci\u003eC\u003c/i\u003e\u003c/span\u003e in a single line. If no such integer exists, print \u0026quot;\u003ctt\u003eNO SOLUTION\u003c/tt\u003e\u0026quot; instead. (Quotes for clarity)\u003c/p\u003e"}},{"title":"Sample Input","value":{"format":"HTML","content":"\u003cp\u003e\r\n\t\u0026nbsp;\u003c/p\u003e\r\n\u003cpre\u003e\r\n3\r\n2 6\r\n32 1760\r\n7 16\r\n\u003c/pre\u003e"}},{"title":"Sample Output","value":{"format":"HTML","content":"\u003cp\u003e\r\n\t\u0026nbsp;\u003c/p\u003e\r\n\u003cpre\u003e\r\n3\r\n55\r\nNO SOLUTION\r\n\u003c/pre\u003e\r\n\u003cp\u003e\r\n\t\u0026nbsp;\u003c/p\u003e\r\n\u003cp\u003e\r\n\t\u0026nbsp;\u003c/p\u003e\r\n\u003chr /\u003e"}}]}