Mohan and his friends got bore so they decided to play something which help them to improve their Mental Math as exams are near by.So all of them frame their own questions for the game. But when Mohan asked his question none his friends was able to answer it so now they asked you for the help you have to tell the largest Factor/Divisor for the given number if it exits.
First line will be the number of T Testcases followed by T lines with 2 number and the remainder separated by space.
Print the largest Factor/Divisor.
So here are total 1 testcase and two numbers are 8 and 4 and there remainder is 0 for 8 and 0 for 4 so the largest factor is 4 for both numbers.