题目描述
Pushkar is very good in Number Theory. He takes two numbers $A\ and\ B$ and declares them a Pushkar Pair. Pushkar Pair has a property that $A$ has a $Modular\$ modulo $B$.
He asks you to tell him the largest number $L$ that divides both of them.
-----Input:-----
- First line will contain $T$, number of testcases. Then the testcases follow.
- Each testcase contains of a single line of input, two integers $A, B$.
-----Output:-----
For each testcase, output in a single line the integer $L$.
-----Constraints-----
- $1 \leq T \leq 1000$
- $2 \leq A,B \leq 10^4$
-----Sample Input:-----
1
3 4
-----Sample Output:-----
1
输入格式
见题面
输出格式
见题面
样例输入
['1', '3 4']
样例输出
['1']