A+B+C Problem
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
64bit IO Format: %lld

题目描述

HZ is doing homework. The answer to a problem is three integers A, B, C. After trying for several hours, he finally solved it. But unfortunately, he lost the value of C by accident. Besides the values of A and B, he only remembers that and is a multiple of . But HZ is so tired that he doesn't want to solve the original problem again. Can you help him calculate the value of C?

输入描述:

The first line of input contains an integer T (), denoting the number of test cases.
Each test case contains two integers A and B in one line. .

输出描述:

For each test case, print one integer C in one line, denoting your answer.
Pay attention that your answer must satisfy and is a multiple of .
If there is no solution, print ``-1''. If there are multiple solutions, you can print any one of them.
示例1

输入

复制
2
1 2
666666 666666

输出

复制
999997
666668