------
## 最终结论
```python
def max_window_area(test_cases):
    results = []
    for a, b, x, y in test_cases:
        # Calculate the maximal area by considering four possible rectangles:
        # 1. Top rectangle: from (0,0) to (a-1,y-1)
        # 2. Bottom rectangle: from (0,y+1) to (a-1,b-1)
        # 3. Left rectangle: from (0,0) to (x-1,b-1)
        # 4. Right rectangle: from (x+1,0) to (a-1,b-1)
        max_area = max(x * b, (a - x - 1) * b, a * y, a * (b - y - 1))
        results.append(max_area)
    return results

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

# Get the results for all test cases
output = max_window_area(test_cases)

# Print each result on a new line
for result in output:
    print(result)
```