Screen resolution of Polycarp's monitor is a × b pixels. Unfortunately, there is one dead pixel at his screen. It has coordinates (x, y) (0 ≤ x < a, 0 ≤ 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 ≤ t ≤ 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 ≤ a, b ≤ 10^4; 0 ≤ x < a; 0 ≤ 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 × 8, and the upper left pixel is a dead pixel. Here you can see one of two possible layouts of the maximal window.

<image>
import java.io.*;
import java.util.*;
import java.math.*;
import java.lang.*;
 
import static java.lang.Math.*;
 
public class MakingString implements Runnable 
{
    static class InputReader 
    {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private SpaceCharFilter filter;
        private BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
 
        public InputReader(InputStream stream) 
        {
            this.stream = stream;
        }
        
        public int read()
        {
            if (numChars==-1) 
                throw new InputMismatchException();
            
            if (curChar >= numChars) 
            {
                curChar = 0;
                try
                {
                    numChars = stream.read(buf);
                }
                catch (IOException e)
                {
                    throw new InputMismatchException();
                }
                
                if(numChars <= 0)               
                    return -1;
            }
            return buf[curChar++];
        }
     
        public String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
        public int nextInt() 
        {
            int c = read();
            
            while(isSpaceChar(c)) 
                c = read();
            
            int sgn = 1;
        
            if (c == '-') 
            {
                sgn = -1;
                c = read();
            }
            
            int res = 0;
            do
            {
                if(c<'0'||c>'9') 
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            while (!isSpaceChar(c)); 
        
            return res * sgn;
        }
        
        public long nextLong() 
        {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-')
            {
                sgn = -1;
                c = read();
            }
            long res = 0;
            
            do 
            {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            while (!isSpaceChar(c));
                return res * sgn;
        }
        
        public double nextDouble() 
        {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-')
            {
                sgn = -1;
                c = read();
            }
            double res = 0;
            while (!isSpaceChar(c) && c != '.') {
                if (c == 'e' || c == 'E')
                    return res * Math.pow(10, nextInt());
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            if (c == '.') 
            {
                c = read();
                double m = 1;
                while (!isSpaceChar(c))
                {
                    if (c == 'e' || c == 'E')
                        return res * Math.pow(10, nextInt());
                    if (c < '0' || c > '9')
                        throw new InputMismatchException();
                    m /= 10;
                    res += (c - '0') * m;
                    c = read();
                }
            }
            return res * sgn;
        }
    
        public String readString() 
        {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            StringBuilder res = new StringBuilder();
            do 
            {
                res.appendCodePoint(c);
                c = read();
            } 
            while (!isSpaceChar(c));
            
            return res.toString();
        }
     
        public boolean isSpaceChar(int c) 
        {
            if (filter != null)
                return filter.isSpaceChar(c);
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }
     
        public String next()
        {
            return readString();
        }
        
        public interface SpaceCharFilter
        {
            public boolean isSpaceChar(int ch);
        }
    }
	
	
	// if modulo is required set value accordingly
	public static long[][] matrixMultiply2dL(long t[][],long m[][])
	{
		long res[][]= new long[t.length][m[0].length];
		
		for(int i=0;i<t.length;i++)
		{
			for(int j=0;j<m[0].length;j++)
			{
				res[i][j]=0;
				for(int k=0;k<t[0].length;k++)
				{
					res[i][j]+=t[i][k]+m[k][j];
				}
			}
		}
		
		return res;
	}
	
	static long combination(long n,long r)
	{
		long ans=1;
		for(long i=0;i<r;i++)
		{
			ans=(ans*(n-i))/(i+1);
		}
		return ans;
	}
	static int mat(String a,String b)
	{
	    int count=0;
	    for(int i=0;i<a.length();i++)
	    {
	        if(a.charAt(i)!=b.charAt(i))
	            count++;
	        
	    }
	    
	    return count;
	}
	
	static int accumulate(int arr[], int first, 
                                     int last) 
    { 
        int init = 0; 
        for (int i = first; i< last; i++) { 
            init = init + arr[i]; 
        } 
      
        return init; 
    } 
  
    // Returns true if it is possible to divide  
    // array into two halves of same sum.  
    // This function mainly uses combinationUtil() 
    static Boolean isPossible(int arr[], int n) 
    { 
        // If size of array is not even. 
        if (n % 2 != 0) 
            return false; 
  
        // If sum of array is not even. 
        int sum = accumulate(arr, 0, n); 
        if (sum % 2 != 0) 
            return false; 
  
        // A temporary array to store all  
        // combination one by one int k=n/2; 
        int half[] = new int[n/2]; 
  
        // Print all combination using temporary 
        // array 'half[]' 
        return combinationUtil(arr, half, 0, n - 1, 
                                0, n, sum); 
    } 
  
    /* arr[] ---> Input Array 
    half[] ---> Temporary array to store current  
                combination of size n/2 
    start & end ---> Staring and Ending indexes in arr[] 
    index ---> Current index in half[] */
    static Boolean combinationUtil(int arr[], int half[],  
                                   int start, int end, 
                                   int index, int n, 
                                   int sum) 
    { 
        // Current combination is ready to  
        // be printed, print it 
        if (index == n / 2) { 
            int curr_sum = accumulate(half, 0 , n/2); 
            return (curr_sum + curr_sum == sum); 
        } 
  
        // replace index with all possible elements.  
        // The condition "end-i+1 >= n/2-index" makes 
        // sure that including one element at index  
        // will make a combination with remaining 
        // elements at remaining positions 
        for (int i = start; i <= end && end - i + 1 >=  
                                  n/2 - index; i++) { 
            half[index] = arr[i]; 
            if (combinationUtil(arr, half, i + 1, end,  
                                 index + 1, n, sum)) 
                return true; 
        } 
  
        return false; 
    } 
    public static void main(String args[]) throws Exception 
    {
        new Thread(null, new MakingString(),"MakingString",1<<27).start();
    }
	// **just change the name of class from Main to reuquired**
    public void run()
    {
        InputReader sc = new InputReader(System.in);
        PrintWriter w = new PrintWriter(System.out);
		
	    
	    
	    
	        int n = sc.nextInt();
	        
	        for(int i=0;i<n;i++)
	        {
	            int x=sc.nextInt();
	            int y=sc.nextInt();
	            int a=sc.nextInt();
	            a=a+1;
	            int b=sc.nextInt();
	            b=b+1;
	            int t1=(a-1);
	            int t2=(x-a);
	            int t3=(b-1);
	            int t4=(y-b);
	            System.out.println(Math.max(Math.max(t1*y,t2*y),Math.max(t3*x,t4*x)));
	        }
	        
	        
	        
	        
	        
	    
        
    
	    
	    
        System.out.flush();
        w.close();
        
    }
}