------
## 最终结论
```python
def find_meeting_time(test_cases):
    results = []
    for x, y, a, b in test_cases:
        distance = y - x
        speed_sum = a + b
        
        if distance % speed_sum == 0:
            results.append(distance // speed_sum)
        else:
            results.append(-1)
    
    return results

# Reading input
t = int(input().strip())
test_cases = [tuple(map(int, input().strip().split())) for _ in range(t)]

# Processing each test case and printing the result
results = find_meeting_time(test_cases)
for result in results:
    print(result)
```