A. Two Rabbits

Being tired of participating in too many Codeforces rounds, Gildong decided to take some rest in a park. He sat down on a bench, and soon he found two rabbits hopping around. One of the rabbits was taller than the other.He noticed that the two rabbits were hopping towards each other. The positions of the two rabbits can be represented as integer coordinates on a horizontal line. The taller rabbit is currently on position xxyyx<yx<yaabbFor example, let’s say x=0x=0y=10y=10a=2a=2b=3b=31122772244Gildong is now wondering: Will the two rabbits be at the same position at the same moment? If so, how long will it take? Let’s find a moment in time (in seconds) after which the rabbits will be at the same point.InputEach test contains one or more test cases. The first line contains the number of test cases tt1≤t≤10001≤t≤1000Each test case contains exactly one line. The line consists of four integers xxyyaabb0≤x<y≤1090≤x<y≤1091≤a,b≤1091≤a,b≤109OutputFor each test case, print the single integer: number of seconds the two rabbits will take to be at the same position.If the two rabbits will never be at the same position simultaneously, print −1−1Example
inputCopy5
0 10 2 3
0 10 3 3
900000000 1000000000 1 9999999
1 2 1 1
1 3 1 1
outputCopy2
-1
10
-1
1
NoteThe first case is explained in the description.In the second case, each rabbit will be at position 337711226644
A. Two Rabbits