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.math.BigInteger;
import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.Period;
import static java.time.temporal.TemporalQueries.localDate;
import java.util.*;
import java.math.RoundingMode;

/*                               I   S   H   M   A   M
                                   R   U   H   A   N
 */
public class Main {

    private static String[] GetStringArray(ArrayList<String> ar) {
        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    }

    //Fastest I/O Class Start
    static class FastReader {

        BufferedReader br;
        StringTokenizer st;

        public FastReader() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (Exception e) {

                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (Exception e) {

            }
            return str;
        }

    }
    //Fastest I/O Class End

    //Fastest Backup I/O Class Start
    static class CustomScanner {

        private final InputStream ins;
        private final byte[] buffer = new byte[1024];
        private int ptr = 0;
        private int buflen = 0;

        CustomScanner() {
            this(System.in);
        }

        CustomScanner(InputStream in) {
            ins = in;
        }

        private boolean hasNextByte() {
            if (ptr < buflen) {
                return true;
            } else {
                ptr = 0;
                try {
                    buflen = ins.read(buffer);
                } catch (IOException e) {
                    e.printStackTrace();
                }
                if (buflen <= 0) {
                    return false;
                }
            }
            return true;
        }

        private int readByte() {
            if (hasNextByte()) {
                return buffer[ptr++];
            } else {
                return -1;
            }
        }

        private static boolean isPrintableChar(int c) {
            return 33 <= c && c <= 126;
        }

        public boolean hasNext() {
            while (hasNextByte() && !isPrintableChar(buffer[ptr])) {
                ptr++;
            }
            return hasNextByte();
        }

        public String next() {
            return nextBuilder().toString();
        }

        public StringBuilder nextBuilder() {
            if (!hasNext()) {
                throw new NoSuchElementException();
            }
            StringBuilder sb = new StringBuilder();
            int b = readByte();
            while (isPrintableChar(b)) {
                sb.appendCodePoint(b);
                b = readByte();
            }
            return sb;
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public long nextLong() {
            if (!hasNext()) {
                throw new NoSuchElementException();
            }
            long n = 0;
            boolean minus = false;
            int b = readByte();
            if (b == '-') {
                minus = true;
                b = readByte();
            }
            if (b < '0' || '9' < b) {
                throw new NumberFormatException();
            }
            while (true) {
                if ('0' <= b && b <= '9') {
                    n *= 10;
                    n += b - '0';
                } else if (b == -1 || !isPrintableChar(b)) {
                    return minus ? -n : n;
                } else {
                    throw new NumberFormatException();
                }
                b = readByte();
            }
        }

        public int nextInt() {
            long nl = nextLong();
            if (nl < Integer.MIN_VALUE || Integer.MAX_VALUE < nl) {
                throw new NumberFormatException();
            }
            return (int) nl;
        }

        public String[] nextA(int n) {
            String[] a = new String[n];
            nextA(a, n);
            return a;
        }

        public void nextA(String[] a, int n) {
            nextA(a, 0, n);
        }

        public void nextA(String[] a, int off, int len) {
            for (int i = off; i < off + len; i++) {
                a[i] = next();
            }
        }

        public int[] nextAInt(int n) {
            int[] a = new int[n];
            nextAInt(a, n);
            return a;
        }

        public void nextAInt(int[] a, int n) {
            nextAInt(a, 0, n);
        }

        public void nextAInt(int[] a, int off, int len) {
            for (int i = off; i < off + len; i++) {
                a[i] = nextInt();
            }
        }

        public long[] nextALong(int n) {
            long[] a = new long[n];
            nextALong(a, n);
            return a;
        }

        public void nextALong(long[] a, int n) {
            nextALong(a, 0, n);
        }

        public void nextALong(long[] a, int off, int len) {
            for (int i = off; i < off + len; i++) {
                a[i] = nextLong();
            }
        }

        public double[] nextADouble(int n) {
            double[] a = new double[n];
            nextADouble(a, n);
            return a;
        }

        public void nextADouble(double[] a, int n) {
            nextADouble(a, 0, n);
        }

        public void nextADouble(double[] a, int off, int len) {
            for (int i = off; i < off + len; i++) {
                a[i] = nextDouble();
            }
        }

        public List<Integer> nextLInt(int n) {
            List<Integer> l = new ArrayList<>(n);
            for (int i = 0; i < n; i++) {
                l.add(inp.nextInt());
            }
            return l;
        }

        public List<Long> nextLLong(int n) {
            List<Long> l = new ArrayList<>(n);
            for (int i = 0; i < n; i++) {
                l.add(inp.nextLong());
            }
            return l;
        }

        public List<Double> nextLDouble(int n) {
            List<Double> l = new ArrayList<>(n);
            for (int i = 0; i < n; i++) {
                l.add(inp.nextDouble());
            }
            return l;
        }
    }

    //Fastest Backup I/O Class End
    //Super Fast I/O class Start
    static class Reader {

        BufferedReader br;
        StringTokenizer st;
        final private int BUFFER_SIZE = 1 << 16;
        private DataInputStream din;
        private byte[] buffer;
        private int bufferPointer, bytesRead;

        public Reader() {
            din = new DataInputStream(System.in);
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (Exception e) {

                }
            }
            return st.nextToken();
        }

        public Reader(String file_name) throws IOException {
            din = new DataInputStream(new FileInputStream(file_name));
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public String readLine() throws IOException {
            byte[] buf = new byte[64]; // line length 
            int cnt = 0, c;
            while ((c = read()) != -1) {
                if (c == '\n') {
                    break;
                }
                buf[cnt++] = (byte) c;
            }
            return new String(buf, 0, cnt);
        }

        public int nextInt() throws IOException {
            int ret = 0;
            byte c = read();
            while (c <= ' ') {
                c = read();
            }
            boolean neg = (c == '-');
            if (neg) {
                c = read();
            }
            do {
                ret = ret * 10 + c - '0';
            } while ((c = read()) >= '0' && c <= '9');

            if (neg) {
                return -ret;
            }
            return ret;
        }

        public long nextLong() throws IOException {
            long ret = 0;
            byte c = read();
            while (c <= ' ') {
                c = read();
            }
            boolean neg = (c == '-');
            if (neg) {
                c = read();
            }
            do {
                ret = ret * 10 + c - '0';
            } while ((c = read()) >= '0' && c <= '9');
            if (neg) {
                return -ret;
            }
            return ret;
        }

        public double nextDouble() throws IOException {
            double ret = 0, div = 1;
            byte c = read();
            while (c <= ' ') {
                c = read();
            }
            boolean neg = (c == '-');
            if (neg) {
                c = read();
            }

            do {
                ret = ret * 10 + c - '0';
            } while ((c = read()) >= '0' && c <= '9');

            if (c == '.') {
                while ((c = read()) >= '0' && c <= '9') {
                    ret += (c - '0') / (div *= 10);
                }
            }

            if (neg) {
                return -ret;
            }
            return ret;
        }

        private void fillBuffer() throws IOException {
            bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
            if (bytesRead == -1) {
                buffer[0] = -1;
            }
        }

        private byte read() throws IOException {
            if (bufferPointer == bytesRead) {
                fillBuffer();
            }
            return buffer[bufferPointer++];
        }

        public void close() throws IOException {
            if (din == null) {
                return;
            }
            din.close();
        }
    }

    //Super Fast I/O Class End
    public int sum = 0;
    static int maxN = 10000007;
    static long[] dp = new long[maxN];
    static TreeMap<Integer, Integer> map = new TreeMap<>();

    static CustomScanner inp = new CustomScanner(System.in);
    public static void main(String[] args) throws IOException {
        //Main mn = new Main();
        // I/O System start
        //Reader inf = new Reader();
        //FastReader in2 = new FastReader();
        CustomScanner in=new CustomScanner();
        PrintWriter out = new PrintWriter(System.out);
        // I/O System End
        //write code

        int n = in.nextInt();

        while (n-- != 0) {
            int a = in.nextInt();
            int b = in.nextInt();
            int x = in.nextInt();
            int y = in.nextInt();
            x++;
            y++;

            int max = 0;
            int cal1 = ((y - 1) * a);
            if (cal1 > max) {
                max = cal1;
            }

            int cal2 = ((b - y) * a);
            if (cal2 > max) {
                max = cal2;
            }

            int cal3 = ((a - x) * b);
            if (cal3 > max) {
                max = cal3;
            }

            int cal4 = ((x - 1) * b);
            if (cal4 > max) {
                max = cal4;
            }

            out.println(max);
            out.flush();
        }

        
        out.close();

        //write end code
    }

    long fibo(int num) {

        if (num == 0) {
            return 0;
        }
        if (num == 1) {
            return 1;
        }

        if (dp[num] != 0) {
            return dp[num];
        }

        dp[num] = fibo(num - 1) + fibo(num - 2);

        return dp[num];
    }

    static class temp {

        int sum;

        public temp(int sum) {
            this.sum = sum;
        }

    }

    //gcd dynamic way
    int gcd2(int a, int b) {
        if (a == 0) {
            return Math.abs(b);
        }
        if (b == 0) {
            return Math.abs(a);
        }
        a = Math.abs(a);
        b = Math.abs(b);
        int az = Integer.numberOfTrailingZeros(a), bz = Integer.numberOfTrailingZeros(b);
        a >>>= az;
        b >>>= bz;
        while (a != b) {
            if (a > b) {
                a -= b;
                a >>>= Integer.numberOfTrailingZeros(a);
            } else {
                b -= a;
                b >>>= Integer.numberOfTrailingZeros(b);
            }
        }
        return (a << Math.min(az, bz));
    }

    long gcd2(long a, long b) {
        if (a == 0) {
            return Math.abs(b);
        }
        if (b == 0) {
            return Math.abs(a);
        }
        a = Math.abs(a);
        b = Math.abs(b);
        int az = Long.numberOfTrailingZeros(a), bz = Long.numberOfTrailingZeros(b);
        a >>>= az;
        b >>>= bz;
        while (a != b) {
            if (a > b) {
                a -= b;
                a >>>= Long.numberOfTrailingZeros(a);
            } else {
                b -= a;
                b >>>= Long.numberOfTrailingZeros(b);
            }
        }
        return (a << Math.min(az, bz));
    }

    //gcd dynamic way
    //get power in O(sqrt-n) complexity
    public long pow(long a, long b) {
        if (b == 0) {
            return 1;
        }
        if (b % 2 == 0) {
            return pow(a * a, b / 2);
        } else {
            return a * pow(a, b - 1);
        }
    }

    //get gcd
    public long gcd(long a, long b) {
        if (a == 0) {
            return b;
        } else {
            return gcd(b % a, a);
        }

    }

    //get lcm
    public long lcm(long a, long b) {
        return a * (b / gcd(a, b));
    }

    //get sub sequence
    public static ArrayList<String> getAllSubSequence(String str) {
        if (str.length() == 0) {
            ArrayList<String> empty = new ArrayList<>();
            empty.add("");
            return empty;
        }

        char ch = str.charAt(0);

        String subStr = str.substring(1);

        ArrayList<String> subSequences = getAllSubSequence(subStr);

        ArrayList<String> res = new ArrayList<>();
        for (String val : subSequences) {
            res.add(val);
            res.add(ch + val);
        }

        res.remove("");

        return res;
    }
}
