{"trustable":false,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cdiv\u003e\n\nThe GCD of two positive integers is the largest integer that divides both the integers without any\nremainder. The LCM of two positive integers is the smallest positive integer that is divisible by both\nthe integers. A positive integer can be the GCD of many pairs of numbers. Similarly, it can be the\nLCM of many pairs of numbers. In this problem, you will be given two positive integers. You have to\noutput a pair of numbers whose GCD is the first number and LCM is the second number.\n\u003c/div\u003e\n\u003cbr\u003e\n\u003cb\u003eInput\u003c/b\u003e\n\u003cbr\u003e\n\u003cp\u003eThe first line of input will consist of a positive integer T. T denotes the number of cases. Each of the next T lines will contain two positive integer, G and L. \u003cp\u003e\n\n\u003cbr\u003e\n\u003cb\u003eOutput\u003c/b\u003e\n\u003cbr\u003e\n\u003cp\u003eFor each case of input, there will be one line of output. It will contain two positive integers a and b, a ≤ b, which has a GCD of G and LCM of L. In case there is more than one pair satisfying the\ncondition, output the pair for which a is minimized. In case there is no such pair, output ‘-1’. \u003c/p\u003e\n\u003cbr\u003e\n\u003cb\u003eConstraints \u003c/b\u003e\u003cbr\u003e\n• T ≤ 100\u003cbr\u003e\n• Both G and L will be less than 231\u003cbr\u003e\n\n\u003cb\u003eSample Input : \u003cbr\u003e\n2 \u003cbr\u003e\n1 2 \u003cbr\u003e\n3 4 \u003cbr\u003e\n\n\u003cb\u003eSample Output : \u003cbr\u003e\n1 2 \u003cbr\u003e\n-1 \u003cbr\u003e\n"}}]}