import java.util.Scanner;
//分析可以得出结论,如果r<2l,必然不存在x和y,LCM最小也为2x
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while (sc.hasNext()) {
int test = sc.nextInt();//测试组数
while (test-- > 0) {
int l = sc.nextInt();
int r = sc.nextInt();
if(r < 2*l) System.out.println("-1 -1");
else System.out.println(l+" "+ (2*l));
}
}
}
}
07-30
442
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交