B. Operations
time limit per test
2 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output

Bossologist is brushing up on his arithmetic skills, and has found an interesting way to practice by doing $$$P$$$ ($$$1 \leq P \leq 10^5$$$) problems of a certain format. For the $$$p$$$th problem, he first picks two numbers $$$A_p$$$ and $$$B_p$$$. He will then use the four operations $$$+, -, *, \div$$$ to combine $$$A_p$$$ and $$$B_p$$$ in any way (i.e. Bossologist finds $$$A_p+B_p$$$, $$$A_p-B_p$$$, $$$B_p+A_p$$$, etc.). For each of $$$P$$$ problems determine the number of distinct answers Bossologist gets.

Input

The first line of input will be $$$P$$$.

The next $$$P$$$ lines will each contain the two numbers $$$A_p$$$ and $$$B_p$$$ ($$$1 \leq A_p, B_p \leq 10^4$$$) he picks for the $$$p$$$th problem.

Note that test case $$$0$$$ is the sample case, which is not worth any points.

Output

Output $$$P$$$ lines where the $$$p$$$th line gives the number of distinct answers Bossologist gets for problem $$$p$$$.

Example
Input
4
2 19
3 5
4 3
6 6
Output
6
6
6
4
Note

For the first problem, the possible answers are $$$2 + 19 = 21$$$, $$$2 - 19 = -17$$$, $$$19 - 2 = 17$$$, $$$19 \cdot 2 = 38$$$, $$$19 \div 2 = 9.5$$$, and $$$2 \div 19 \approx 0.105$$$, for a total of $$$6$$$ distinct answers.

$$$---------------------------------------------$$$

Problem Idea: Bossologist

Problem Preparation: Bossolgist

Occurrences: Novice 2