Screen resolution of Polycarp's monitor is $a \times b$ pixels. Unfortunately, there is one dead pixel at his screen. It has coordinates $(x, y)$ ($0 \le x < a, 0 \le y < b$). You can consider columns of pixels to be numbered from $0$ to $a-1$, and rows — from $0$ to $b-1$.

Polycarp wants to open a rectangular window of maximal size, which doesn't contain the dead pixel. The boundaries of the window should be parallel to the sides of the screen.

Print the maximal area (in pixels) of a window that doesn't contain the dead pixel inside itself.


-----Input-----

In the first line you are given an integer $t$ ($1 \le t \le 10^4$) — the number of test cases in the test. In the next lines you are given descriptions of $t$ test cases.

Each test case contains a single line which consists of $4$ integers $a, b, x$ and $y$ ($1 \le a, b \le 10^4$; $0 \le x < a$; $0 \le y < b$) — the resolution of the screen and the coordinates of a dead pixel. It is guaranteed that $a+b>2$ (e.g. $a=b=1$ is impossible).


-----Output-----

Print $t$ integers — the answers for each test case. Each answer should contain an integer equal to the maximal possible area (in pixels) of a rectangular window, that doesn't contain the dead pixel.


-----Example-----
Input
6
8 8 0 0
1 10 0 3
17 31 10 4
2 1 0 0
5 10 3 9
10 10 4 8

Output
56
6
442
1
45
80



-----Note-----

In the first test case, the screen resolution is $8 \times 8$, and the upper left pixel is a dead pixel. Here you can see one of two possible layouts of the maximal window. [Image]

Starter code:

Solutions:
from math import *

zzz = int(input())
for zz in range(zzz):
    a, b, x, y = list(map(int, input().split()))
    print(max(x*b, (a-x-1)*b, y*a, (b - y - 1)*a))


for t in range(int(input())):
    a, b, x, y = [int(i) for i in input().split()]
    l = max(x, a - 1 - x)
    h = max(y, b - 1 - y)
    print(max(l * b, h * a))


for _ in range(int(input())):
    a, b, x, y = list(map(int, input().split()))
    num1 = x * b
    num2 = y * a
    num3 = (a - x - 1) * b
    num4 = (b - y - 1) * a
    print(max(num2, num1, num3, num4))

for _ in range(int(input())):
    a, b, x, y = map(int, input().split())
    w = max(a-1-x, x)
    h = max(b-1-y, y)

    ans = max(w * b, h * a)
    print(ans)

for _ in range(int(input())):
    a, b, x, y = list(map(int, input().split()))
    print(max(x*b, y*a, (a-x-1)*b, (b-y-1)*a))


t = int(input())
for _ in range(t):
	a, b, x, y = map(int, input().split())
	r = max([a*y, a*(b-y-1), b*x, b*(a-x-1)])
	print(r)

t = int(input())
for _ in range(t):
    a, b, x, y = list(map(int, input().split()))
    print(max(a*y, a*(b-y-1), x*b, (a-x-1)*b))


t = int(input())
for _ in range(t):
	a, b, x, y = map(int, input().split())

	l = max(a*y, a*(b-y-1))
	ll = max(b*x, b*(a-x-1))
	print(max(l, ll))

import sys
input = sys.stdin.readline
for k in range(int(input())):
    a, b, x, y = list(map(int, input().split(" ")))
    print(max(a*y, b*x, (b-1-y)*a, (a-1-x)*b)) 


import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
  h,w,x,y = map(int,input().split())
  can = [h*y,h*(w-1-y),w*x,w*(h-1-x)]
  print(max(can))

t = int(input())
for _ in range(t):
  n,m,a,b = map(int,input().split())
  print(max(max(a,n-a-1)*m,max(b,m-b-1)*n))

# from collections import deque
import sys
input = lambda: sys.stdin.readline().strip()
for i in range(int(input())):
    a,b,x,y = map(int,input().split())
    print(max(a*y,b*x,a*(b-y-1),b*(a-x-1)))

for _ in range(int(input())):
    n,m,x,y=map(int,input().split())
    s=0
    s=max(s,x*m)
    s=max(s,(n-x-1)*m)
    s=max(s,y*n)
    s=max(s,(m-y-1)*n)
    print(s)

t = int(input())
for i in range(t):
    a, b, x, y = list(map(int, input().split()))
    print(max(x * b, y * a, (a - x - 1) * b, (b - y - 1) * a))


t = int(input())
for _ in range(t):
    a,b,x,y = map(int, input().split())
    print(max([x*b,(a-x-1)*b,a*y,a*(b-y-1)]))

from math import *
from collections import *
t = int(input())
for y in range(t):
	a,b,x,y = map(int,input().split())
	l = max(x,a-x-1)
	w = max(y,b-y-1)
	print(max(l*b,a*w))

import sys
import math
from collections import defaultdict
from collections import deque
from itertools import combinations
from itertools import permutations
input = lambda : sys.stdin.readline().rstrip()
read = lambda : list(map(int, input().split()))
go = lambda : 1/0
def write(*args, sep="\n"):
  for i in args:
    sys.stdout.write("{}{}".format(i, sep))
INF = float('inf')
MOD = int(1e9 + 7)
YES = "YES"
NO = "NO"

for _ in range(int(input())):
  try:
    a, b, x, y = read()
    up = y * a
    down = (b - y - 1) * a
    left = x * b
    right = (a - x - 1) * b 

    print(max([up, down, left, right]))

  except ZeroDivisionError:
    continue

  except Exception as e:
    print(e)
    continue

TC = int(input())

for _ in range(TC):
    a, b, x, y = list(map(int, input().split()))
    print((max(
        y * a,
        x * b,
        (b - y - 1) * a,
        (a - x - 1) * b
    )))





for nt in range(int(input())):
	a,b,x,y=map(int,input().split())
	a1=max(x,0)*b
	a2=(a-x-1)*b
	a3=(y)*a
	a4=(b-y-1)*a
	print (max(a1,a2,a3,a4))

def main(a, b, x, y):
	sol = max(max(x, a-x-1)*b, max(y, b-y-1)*a)
	print(sol)

n = int(input())
for _ in range(n):
	lst = list(map(int, input().split()))
	a, b, x, y = lst[0], lst[1], lst[2], lst[3]
	main(a, b, x, y)


t=int(input())
for i in range(t):
    a,b,x,y=list(map(int,input().split()))
    r = [a*y, b*x, a*(b-y-1), b*(a-x-1)]
    print(max(r))


t = int(input())
while t:
    t += -1
    a, b, x, y = map(int, input().split())
    a1 = b * x
    a2 = a * y
    a3 = b * (a - x - 1)
    a4 = a * (b - y - 1)
    print(max(a1, a2, a3, a4))

from sys import stdin,stderr
def rl():
    return [int(w) for w in stdin.readline().split()]

t, = rl()
for _ in range(t):
    a,b,x,y = rl()
    print(max(x*b,y*a,(a-x-1)*b,(b-y-1)*a))


t = int(input())
for _ in range(t):
    a, b, x, y = list(map(int, input().split()))
    h = max(a-x-1, x) * b
    v = max(b-y-1, y) * a
    print(max(h, v))


import sys
input = sys.stdin.readline


def main():
    t = int(input())
    for _ in range(t):
        A, B, X, Y = [int(x) for x in input().split()]
        ma = 0
        ma = max(X * B, ma)
        ma = max(Y * A, ma)
        ma = max((A - X - 1) * B, ma)
        ma = max((B - Y - 1) * A, ma)

        print(ma)


        
        
    

def __starting_point():
    main()



__starting_point()

t = int(input())
while t:
    t -= 1
    a, b, x, y = list(map(int, input().split()))
    area1 = a * y
    area2 = x * b
    area3 = (a - 1 - x) * b
    area4 = a * (b - 1 - y)
    print(max(area1, area2, area3, area4))


for _ in range(int(input())):
    a,b,x,y = map(int,input().split())
    total = a*b
    left = x*b
    right = total - left - b
    down = a*y
    up = total - down - a
    print( max( left, right, down, up ) )

for i in range(int(input())):
    a, b, x, y = list(map(int, input().split()))
    print(max(a*max(y, b-y-1), b*max(x, a-x-1)))


#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=tf-8
#

"""
"""

from operator import itemgetter
from collections import Counter

def solve(a, b, x, y):
    area1 = x*b
    area2 = (a-x-1)*b
    area3 = a*y
    area4 = a*(b-y-1)
    print(max(area1,area2,area3,area4))


def main():
    t= int(input())
    for i in range(t):
        a, b, x, y = map(int,input().split())
        solve(a, b, x, y)


def __starting_point():
    main()
__starting_point()