import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Pranay2516
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastReader in = new FastReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskC solver = new TaskC();
        int testCount = Integer.parseInt(in.next());
        for (int i = 1; i <= testCount; i++)
            solver.solve(i, in, out);
        out.close();
    }

    static class TaskC {
        public void solve(int testNumber, FastReader in, PrintWriter out) {
            int x1 = in.nextInt(), y1 = in.nextInt(), x2 = in.nextInt(), y2 = in.nextInt();
            if (x1 == x2 || y1 == y2) {
                out.println(1);
                return;
            }
            int a = Math.abs(x2 - x1);
            int b = Math.abs(y2 - y1);
            int max = Math.max(a, b);
            int min = Math.min(a, b);
            out.println((a + 1) * (b + 1) / 2);
        }

    }

    static class FastReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private FastReader.SpaceCharFilter filter;

        public FastReader(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 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 String next() {

            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 interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Pranay2516
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastReader in = new FastReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskC solver = new TaskC();
        int testCount = Integer.parseInt(in.next());
        for (int i = 1; i <= testCount; i++)
            solver.solve(i, in, out);
        out.close();
    }

    static class TaskC {
        public void solve(int testNumber, FastReader in, PrintWriter out) {
            int x1 = in.nextInt(), y1 = in.nextInt(), x2 = in.nextInt(), y2 = in.nextInt();
            if (x1 == x2 || y1 == y2) {
                out.println(1);
                return;
            }
            int a = Math.abs(x2 - x1);
            int b = Math.abs(y2 - y1);
            int max = Math.max(a, b);
            int min = Math.min(a, b);
            out.println((int) Math.ceil(func.C(max + min, min)));
        }

    }

    static class FastReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private FastReader.SpaceCharFilter filter;

        public FastReader(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 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 String next() {

            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 interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }

    static class func {
        public static int C(int n, int k) {
            double res = 1;
            for (int i = 1; i <= k; ++i) res = res * (n - k + 1) / i;
            return (int) (res + 0.01);
        }

    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Tanzim Ibn Patowary
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskC solver = new TaskC();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskC {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            for (int test = 0; test < testNumber; test++) {
                int t = in.nextInt();
                int n, m;
                int x1, y1, x2, y2;
                while (t-- != 0) {
                    x1 = in.nextInt();
                    y1 = in.nextInt();
                    x2 = in.nextInt();
                    y2 = in.nextInt();
                    if (x1 == x2 || y1 == y2) {
                        out.println(1);
                    } else {
                        m = Math.abs(x1 - x2);
                        n = Math.abs(y1 - y2);
                        out.println(m + n);
                    }
                }
            }
        }

    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Tanzim Ibn Patowary
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskC solver = new TaskC();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskC {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            for (int test = 0; test < testNumber; test++) {
                int t = in.nextInt();
                int x1, y1, x2, y2;
                while (t-- >= 0) {
                    x1 = in.nextInt();
                    y1 = in.nextInt();
                    x2 = in.nextInt();
                    y2 = in.nextInt();
                    int r = x2 - x1, r1 = y2 - y1;
                    if ((r == 1 && r1 == 1) || Math.min(r, r1) == 0) {
                        if (Math.min(r, r1) == 0) {
                            out.println(1);
                        } else {
                            out.println(2);
                        }
                        continue;
                    }
                    if (Math.min(r, r1) == 1) {
                        t = 1;
                    } else {
                        t = 2;
                    }
                    out.println(r * r1 * 2 - t);
                }
            }
        }

    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Tanzim Ibn Patowary
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskC solver = new TaskC();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskC {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            for (int test = 0; test < testNumber; test++) {
                int t = in.nextInt();
                int n, m;
                int x1, y1, x2, y2;
                while (t-- != 0) {
                    x1 = in.nextInt();
                    y1 = in.nextInt();
                    x2 = in.nextInt();
                    y2 = in.nextInt();
                    m = x2 - x1 + 1;
                    n = y2 - y1 + 1;

                    int ans = 1;
                    for (int i = n; i < (m + n - 1); i++) {
                        ans *= i;
                        ans /= (i - n + 1);
                    }
                    out.println(ans);
                }
            }
        }

    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Tanzim Ibn Patowary
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskC solver = new TaskC();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskC {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            for (int test = 0; test < testNumber; test++) {
                int t = in.nextInt();
                while (t-- != 0) {
                    int x1, y1, x2, y2;
                    x1 = in.nextInt();
                    y1 = in.nextInt();
                    x2 = in.nextInt();
                    y2 = in.nextInt();
                    int row = x2 - x1, col = y2 - y1;
                    long n = row + col;
                    long k = col;
                    out.println(check(n, k));

                }
            }
        }

        public static long check(long n, long k) {
            long res = 1;

            if (k > n - k)
                k = n - k;

            for (int i = 0; i < k; ++i) {
                res *= (n - i);
                res /= (i + 1);
            }
            return res;
        }

    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Tanzim Ibn Patowary
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskC solver = new TaskC();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskC {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            for (int test = 0; test < testNumber; test++) {
                long t = in.nextLong();
                while (t-- != 0) {
                    long x1, y1, x2, y2;
                    x1 = in.nextLong();
                    y1 = in.nextLong();
                    x2 = in.nextLong();
                    y2 = in.nextLong();
                    long m = 0;
                    long n = 0;
                    if (x1 == x2 || y1 == y2) {
                        out.println(1);
                    }
                    //else if((x1==x2 && y1!=y2) || (x1!=x2 && y1==y2)){cout<<1<<endl;}
                    else {
                        m = Math.abs(x1 - x2);
                        n = Math.abs(y1 - y2);
                        out.println(m * n + 1);
                    }

                }
            }
        }

    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Tanzim Ibn Patowary
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskC solver = new TaskC();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskC {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            for (int test = 0; test < testNumber; test++) {
                int t = in.nextInt();
                while (t-- != 0) {
                    int x1, y1, x2, y2;
                    x1 = in.nextInt();
                    y1 = in.nextInt();
                    x2 = in.nextInt();
                    y2 = in.nextInt();
                    int m = 0;
                    int n = 0;
                    if (x1 == x2 || y1 == y2) {
                        out.println(1);
                    }
                    //else if((x1==x2 && y1!=y2) || (x1!=x2 && y1==y2)){cout<<1<<endl;}
                    else {
                        m = Math.abs(x1 - x2);
                        n = Math.abs(y1 - y2);
                        out.println(m * n + 1);
                    }

                }
            }
        }

    }
}


import java.util.*;
public class cr645_c {

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int t = s.nextInt();
		while(t-->0) {
			long x1 = s.nextLong();
			long y1 = s.nextLong();
			long x2 = s.nextLong();
			long y2 = s.nextLong();
			long ans = 0;
			if(x1==x2 || y1==y2) {
				System.out.println(1);
			}else {
				ans = Math.abs((int)(x2-x1))+Math.abs((int)(y2-y1));
				System.out.println(ans);
			}
		}
	}

}


import java.util.*;
public class cr645_c {

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int t = s.nextInt();
		while(t-->0) {
			long x1 = s.nextLong();
			long y1 = s.nextLong();
			long x2 = s.nextLong();
			long y2 = s.nextLong();
			long ans = 0;
			if(x1==x2 || y1==y2) {
				System.out.println(1);
			}else {
				ans = Math.abs((int)(x2-x1))*Math.abs((int)(y2-y1));
				System.out.println(ans+1);
			}
		}
	}

}


import java.util.*;
public class cr645_c {

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int t = s.nextInt();
		while(t-->0) {
			long x1 = s.nextLong();
			long y1 = s.nextLong();
			long x2 = s.nextLong();
			long y2 = s.nextLong();
			long ans = 0;
			ans = (x2-x1)*(y2-y1);
			System.out.println(ans+1);
		}
	}

}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;
import java.util.StringTokenizer;
import java.util.*;
public class code5{
   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 (IOException  e)
                {
                    e.printStackTrace();
                }
            }
            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 (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
    }
   public static void main(String args[]){
         FastReader sc=new FastReader();
         int t=sc.nextInt();
         while(t-->0){
            int x1=sc.nextInt();
            int y1=sc.nextInt();
            int x2=sc.nextInt();
            int y2=sc.nextInt();
            System.out.println((x2-x1)*(y2-y1)+1);
        }
     }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;
import java.util.StringTokenizer;
import java.util.*;
public class code5{
   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 (IOException  e)
                {
                    e.printStackTrace();
                }
            }
            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 (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
    }
   public static void main(String args[]){
         FastReader sc=new FastReader();
         int t=sc.nextInt();
         while(t-->0){
            long x1=sc.nextInt();
            long y1=sc.nextInt();
            long x2=sc.nextInt();
            long y2=sc.nextInt();
            System.out.println((x2-x1)*(y2-y1)+1);
        }
     }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;

public class C_Practice {

	static Reader r = new Reader();
	static PrintWriter out = new PrintWriter(System.out);

	private static void solve1() throws IOException {

		int n = r.nextInt();
		int arr[] = r.nextIntArray(n);

		for (int i = 0; i < n; i++) {
			if (arr[i] > i + 1) {
				out.println(-1);
				out.close();
				return;
			}
		}

		int cnt = 1;
		int ans[] = new int[n];
		Arrays.fill(ans, -1);
		boolean vis[] = new boolean[(int) 1e6 + 1];
		ArrayList<Integer> av = new ArrayList<Integer>();

		vis[arr[0]] = true;
		for (int i = 1; i < n; i++) {
			if (arr[i] != arr[i - 1]) {
				ans[i] = arr[i - 1];
				vis[arr[i]] = true;
			} else {
				cnt++;
			}
		}

		for (int i = 0; i <= 1000000 && cnt > 0; i++) {
			if (!vis[i]) {
				av.add(i);
				cnt--;
			}
		}

		int idx = 0;
		for (int i = 0; i < n; i++) {
			if (ans[i] == -1) {
				ans[i] = av.get(idx++);
			}
		}

		for (int i = 0; i < n; i++) {
			out.print(ans[i] + " ");
		}
		out.close();

	}

	static ArrayList<Integer> tree[];
	static int one, more;

	private static void BFS(int node, int depth, int parent) {
		if (depth == 1) {
			one++;
		} else if (depth > 1) {
			more++;
		}
		for (int child : tree[node]) {
			if (child != parent) {
				BFS(child, depth + 1, node);
			}
		}
	}

	private static void solve2() throws IOException {

		int t = r.nextInt();
		StringBuilder res = new StringBuilder();

		while (t-- > 0) {

			int n = r.nextInt();
			int x = r.nextInt();

			one = 0;
			more = 0;

			tree = new ArrayList[n + 1];

			for (int i = 1; i <= n; i++) {
				tree[i] = new ArrayList<Integer>();
			}

			for (int i = 1; i <= n - 1; i++) {
				int u = r.nextInt();
				int v = r.nextInt();
				tree[u].add(v);
				tree[v].add(u);
			}

			BFS(x, 0, -1);

			String ans = "";

			if (one <= 1) {
				ans = "Ayush";
			} else {
				int chance = (more & 1) == 0 ? 0 : 1; // 0 --> Ayush || 1 --> Ashish //
				if ((one & 1) == 0) {
					chance = (chance + 1) % 2;
				}
				ans = (chance == 0) ? "Ayush" : "Ashish";
			}

			res.append(ans).append("\n");

		}

		out.print(res);
		out.close();
	}

	private static boolean isOn(long num, int bit) {
		if ((num & (1L << bit)) == 0) {
			return false;
		}
		return true;
	}

	private static void solve3() throws IOException {

		int t = r.nextInt();
		StringBuilder res = new StringBuilder();

		while (t-- > 0) {
			long n = r.nextLong();
			long ans = 2 * n - Long.bitCount(n);
			res.append(ans).append("\n");
		}

		out.print(res);
		out.close();

	}

	private static void solve4() throws IOException {

		int t = r.nextInt();
		StringBuilder res = new StringBuilder();

		while (t-- > 0) {

			int n = r.nextInt();

			ArrayList<Integer> arr = new ArrayList<Integer>();
			for (int i = 0; i < n; i++) {
				arr.add(r.nextInt());
			}
			Collections.sort(arr);

			int ans = -1;
			ArrayList<Integer> temp;

			for (int i = 1; i <= 1024; i++) {
				temp = new ArrayList<Integer>();
				for (int j = 0; j < n; j++) {
					temp.add((arr.get(j) ^ i));
				}
				Collections.sort(temp);
				if (temp.equals(arr)) {
					ans = i;
					break;
				}
			}

			res.append(ans).append("\n");

		}

		out.print(res);
		out.close();

	}

	private static void solve5() throws IOException {

		int t = r.nextInt();
		StringBuilder res = new StringBuilder();

		while (t-- > 0) {
			int x1 = r.nextInt();
			int y1 = r.nextInt();
			int x2 = r.nextInt();
			int y2 = r.nextInt();
			res.append((long) (x2 - x1) * (y2 - y1) + 1).append("\n");
		}

		out.print(res);
		out.close();
	}

	private static void solve6() throws IOException {

		int t = r.nextInt();
		StringBuilder res = new StringBuilder();

		while (t-- > 0) {

			int n = r.nextInt();

			res.append(false).append("\n");
		}

		out.print(res);
		out.close();

	}

	public static void main(String[] args) throws IOException {

//		solve1();

//		solve2();

//		solve3();

//		solve4();

		solve5();

		// solve6();

	}

	static class Reader {

		final private int BUFFER_SIZE = 1 << 12;
		boolean consume = false;
		private byte[] buffer;
		private int bufferPointer, bytesRead;
		private boolean reachedEnd = false;

		public Reader() {
			buffer = new byte[BUFFER_SIZE];
			bufferPointer = 0;
			bytesRead = 0;
		}

		public boolean hasNext() {
			return !reachedEnd;
		}

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

		private void consumeSpaces() throws IOException {
			while (read() <= ' ' && reachedEnd == false)
				;
			bufferPointer--;
		}

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

		public String next() throws IOException {
			StringBuilder sb = new StringBuilder();
			consumeSpaces();
			byte c = read();
			do {
				sb.append((char) c);
			} while ((c = read()) > ' ');
			if (consume) {
				consumeSpaces();
			}
			;
			if (sb.length() == 0) {
				return null;
			}
			return sb.toString();
		}

		public String nextLine() throws IOException {
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			String str = br.readLine();
			return str;
		}

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

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

		public double nextDouble() throws IOException {
			consumeSpaces();
			double ret = 0;
			double div = 1;
			byte 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 (consume) {
				consumeSpaces();
			}
			if (neg) {
				return -ret;
			}
			return ret;
		}

		public int[] nextIntArray(int n) throws IOException {
			int[] a = new int[n];
			for (int i = 0; i < n; i++) {
				a[i] = nextInt();
			}
			return a;
		}

		public long[] nextLongArray(int n) throws IOException {
			long[] a = new long[n];
			for (int i = 0; i < n; i++) {
				a[i] = nextLong();
			}
			return a;
		}

		public int[][] nextIntMatrix(int n, int m) throws IOException {
			int[][] grid = new int[n][m];
			for (int i = 0; i < n; i++) {
				grid[i] = nextIntArray(m);
			}
			return grid;
		}

		public char[][] nextCharacterMatrix(int n) throws IOException {
			char[][] a = new char[n][];
			for (int i = 0; i < n; i++) {
				a[i] = next().toCharArray();
			}
			return a;
		}

		public void close() throws IOException {
			if (System.in == null) {
				return;
			} else {
				System.in.close();
			}
		}
	}

}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;

public class C_Practice {

	static Reader r = new Reader();
	static PrintWriter out = new PrintWriter(System.out);

	private static void solve1() throws IOException {

		int n = r.nextInt();
		int arr[] = r.nextIntArray(n);

		for (int i = 0; i < n; i++) {
			if (arr[i] > i + 1) {
				out.println(-1);
				out.close();
				return;
			}
		}

		int cnt = 1;
		int ans[] = new int[n];
		Arrays.fill(ans, -1);
		boolean vis[] = new boolean[(int) 1e6 + 1];
		ArrayList<Integer> av = new ArrayList<Integer>();

		vis[arr[0]] = true;
		for (int i = 1; i < n; i++) {
			if (arr[i] != arr[i - 1]) {
				ans[i] = arr[i - 1];
				vis[arr[i]] = true;
			} else {
				cnt++;
			}
		}

		for (int i = 0; i <= 1000000 && cnt > 0; i++) {
			if (!vis[i]) {
				av.add(i);
				cnt--;
			}
		}

		int idx = 0;
		for (int i = 0; i < n; i++) {
			if (ans[i] == -1) {
				ans[i] = av.get(idx++);
			}
		}

		for (int i = 0; i < n; i++) {
			out.print(ans[i] + " ");
		}
		out.close();

	}

	static ArrayList<Integer> tree[];
	static int one, more;

	private static void BFS(int node, int depth, int parent) {
		if (depth == 1) {
			one++;
		} else if (depth > 1) {
			more++;
		}
		for (int child : tree[node]) {
			if (child != parent) {
				BFS(child, depth + 1, node);
			}
		}
	}

	private static void solve2() throws IOException {

		int t = r.nextInt();
		StringBuilder res = new StringBuilder();

		while (t-- > 0) {

			int n = r.nextInt();
			int x = r.nextInt();

			one = 0;
			more = 0;

			tree = new ArrayList[n + 1];

			for (int i = 1; i <= n; i++) {
				tree[i] = new ArrayList<Integer>();
			}

			for (int i = 1; i <= n - 1; i++) {
				int u = r.nextInt();
				int v = r.nextInt();
				tree[u].add(v);
				tree[v].add(u);
			}

			BFS(x, 0, -1);

			String ans = "";

			if (one <= 1) {
				ans = "Ayush";
			} else {
				int chance = (more & 1) == 0 ? 0 : 1; // 0 --> Ayush || 1 --> Ashish //
				if ((one & 1) == 0) {
					chance = (chance + 1) % 2;
				}
				ans = (chance == 0) ? "Ayush" : "Ashish";
			}

			res.append(ans).append("\n");

		}

		out.print(res);
		out.close();
	}

	private static boolean isOn(long num, int bit) {
		if ((num & (1L << bit)) == 0) {
			return false;
		}
		return true;
	}

	private static void solve3() throws IOException {

		int t = r.nextInt();
		StringBuilder res = new StringBuilder();

		while (t-- > 0) {
			long n = r.nextLong();
			long ans = 2 * n - Long.bitCount(n);
			res.append(ans).append("\n");
		}

		out.print(res);
		out.close();

	}

	private static void solve4() throws IOException {

		int t = r.nextInt();
		StringBuilder res = new StringBuilder();

		while (t-- > 0) {

			int n = r.nextInt();

			ArrayList<Integer> arr = new ArrayList<Integer>();
			for (int i = 0; i < n; i++) {
				arr.add(r.nextInt());
			}
			Collections.sort(arr);

			int ans = -1;
			ArrayList<Integer> temp;

			for (int i = 1; i <= 1024; i++) {
				temp = new ArrayList<Integer>();
				for (int j = 0; j < n; j++) {
					temp.add((arr.get(j) ^ i));
				}
				Collections.sort(temp);
				if (temp.equals(arr)) {
					ans = i;
					break;
				}
			}

			res.append(ans).append("\n");

		}

		out.print(res);
		out.close();

	}

	private static void solve5() throws IOException {

		int t = r.nextInt();
		StringBuilder res = new StringBuilder();

		while (t-- > 0) {
			int x1 = r.nextInt();
			int y1 = r.nextInt();
			int x2 = r.nextInt();
			int y2 = r.nextInt();
			res.append((x2 - x1) * (y2 - y1) + 1).append("\n");
		}

		out.print(res);
		out.close();
	}

	private static void solve6() throws IOException {

		int t = r.nextInt();
		StringBuilder res = new StringBuilder();

		while (t-- > 0) {

			int n = r.nextInt();

			res.append(false).append("\n");
		}

		out.print(res);
		out.close();

	}

	public static void main(String[] args) throws IOException {

//		solve1();

//		solve2();

//		solve3();

//		solve4();

		solve5();

		// solve6();

	}

	static class Reader {

		final private int BUFFER_SIZE = 1 << 12;
		boolean consume = false;
		private byte[] buffer;
		private int bufferPointer, bytesRead;
		private boolean reachedEnd = false;

		public Reader() {
			buffer = new byte[BUFFER_SIZE];
			bufferPointer = 0;
			bytesRead = 0;
		}

		public boolean hasNext() {
			return !reachedEnd;
		}

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

		private void consumeSpaces() throws IOException {
			while (read() <= ' ' && reachedEnd == false)
				;
			bufferPointer--;
		}

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

		public String next() throws IOException {
			StringBuilder sb = new StringBuilder();
			consumeSpaces();
			byte c = read();
			do {
				sb.append((char) c);
			} while ((c = read()) > ' ');
			if (consume) {
				consumeSpaces();
			}
			;
			if (sb.length() == 0) {
				return null;
			}
			return sb.toString();
		}

		public String nextLine() throws IOException {
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			String str = br.readLine();
			return str;
		}

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

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

		public double nextDouble() throws IOException {
			consumeSpaces();
			double ret = 0;
			double div = 1;
			byte 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 (consume) {
				consumeSpaces();
			}
			if (neg) {
				return -ret;
			}
			return ret;
		}

		public int[] nextIntArray(int n) throws IOException {
			int[] a = new int[n];
			for (int i = 0; i < n; i++) {
				a[i] = nextInt();
			}
			return a;
		}

		public long[] nextLongArray(int n) throws IOException {
			long[] a = new long[n];
			for (int i = 0; i < n; i++) {
				a[i] = nextLong();
			}
			return a;
		}

		public int[][] nextIntMatrix(int n, int m) throws IOException {
			int[][] grid = new int[n][m];
			for (int i = 0; i < n; i++) {
				grid[i] = nextIntArray(m);
			}
			return grid;
		}

		public char[][] nextCharacterMatrix(int n) throws IOException {
			char[][] a = new char[n][];
			for (int i = 0; i < n; i++) {
				a[i] = next().toCharArray();
			}
			return a;
		}

		public void close() throws IOException {
			if (System.in == null) {
				return;
			} else {
				System.in.close();
			}
		}
	}

}


import java.io.*;
import java.util.*;

public class codeforces {
    static class pair {
        int x;
        int y;

        public pair(int x, int y) {
            this.x = x;
            this.y = y;
        }
    }

    public static long sqrt(long x) {
        long s = 0, e = x, root = 0;
        while (s <= e) {
            long mid = (s + e) / 2;
            if (mid * mid == x)
                return mid;
            if (mid * mid < x) {
                root = mid;
                s = mid + 1;
            } else
                e = mid - 1;
        }
        return root;
    }

    public static long power(long a, long b) {
        if (a == 0 || b == 0)
            return 1L;
        long ans = power(a, b / 2);
        ans *= ans;
        if (b % 2 == 1)
            ans *= a;
        return ans;
    }

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

    public static boolean isSubsequence(String a, String b) {
        int m = a.length(), n = b.length(), i = 0, j = 0;
        while (i < m && j < n) {
            if (a.charAt(i) == b.charAt(j)) {
                i++;
            }
            j++;
        }
        return i == m;
    }

    public static boolean isprime(long x) {
        if (x == 1)
            return false;
        if (x < 4)
            return true;
        int root = (int) Math.sqrt(x);
        for (int i = 2; i <= root; i++) {
            if (x % i == 0)
                return false;
        }
        return true;
    }

    public static long longmax(long a, long b) {
        return Math.max(a, b);
    }

    public static long longmin(long a, long b) {
        return Math.min(a, b);
    }

    public static int intmax(int a, int b) {
        return Math.max(a, b);
    }

    public static int intmin(int a, int b) {
        return Math.min(a, b);
    }

    public static void rev(char[] ch) {
        int s = 0, e = ch.length - 1;
        while (s < e) {
            char c = ch[s];
            ch[s] = ch[e];
            ch[e] = c;
            s++;
            e--;
        }
    }

    public static void main(String args[]) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder str = new StringBuilder();
        PrintWriter out = new PrintWriter(System.out);
        int t = Integer.parseInt(br.readLine());
        while (t-- > 0) {
            // int n=Integer.parseInt(br.readLine());
            String[] lol = br.readLine().split(" ");
            // TreeMap<Integer,Integer> map=new TreeMap<>();
            // int n = Integer.parseInt(lol[0]), m = Integer.parseInt(lol[1]);
            // a = Integer.parseInt(lol[2]),
            // b = Integer.parseInt(lol[3]);
            // long n=Long.parseLong(lol[0]),k=Long.parseLong(lol[1]);
            // int a=Integer.parseInt(lol[0]),b=Integer.parseInt(lol[1]);
            int[] a = new int[4];
            for (int i = 0; i < 4; i++) {
                a[i] = Integer.parseInt(lol[i]);
            }
            int m=a[2]-a[0];
            int n=a[3]-a[1];
            long path=1L;
            if(m==0 || n==0)
            str.append("1\n");
            else
            if(n<2 || m<2){
                str.append((1+intmax(m,n))+"\n");
            }
            else{
                String b=String.valueOf(intmax(m,n));
                String s=String.valueOf(intmin(m,n));
                long big=Long.valueOf(b);
                long small=Long.valueOf(s);
                long sum=(small*(small+1));
                big--;
                sum=sum+(big-small)*small;
                str.append((sum+1)+"\n");
            }

            // int[] freq=new int[n+1];
            // boolean[] vis=new boolean[n+1];
            // Arrays.sort(a);
        }
        out.print(str);
        out.close();
    }
}


import java.io.*;
import java.util.*;

public class codeforces {
    static class pair {
        int x;
        int y;

        public pair(int x, int y) {
            this.x = x;
            this.y = y;
        }
    }

    public static long sqrt(long x) {
        long s = 0, e = x, root = 0;
        while (s <= e) {
            long mid = (s + e) / 2;
            if (mid * mid == x)
                return mid;
            if (mid * mid < x) {
                root = mid;
                s = mid + 1;
            } else
                e = mid - 1;
        }
        return root;
    }

    public static long power(long a, long b) {
        if (a == 0 || b == 0)
            return 1L;
        long ans = power(a, b / 2);
        ans *= ans;
        if (b % 2 == 1)
            ans *= a;
        return ans;
    }

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

    public static boolean isSubsequence(String a, String b) {
        int m = a.length(), n = b.length(), i = 0, j = 0;
        while (i < m && j < n) {
            if (a.charAt(i) == b.charAt(j)) {
                i++;
            }
            j++;
        }
        return i == m;
    }

    public static boolean isprime(long x) {
        if (x == 1)
            return false;
        if (x < 4)
            return true;
        int root = (int) Math.sqrt(x);
        for (int i = 2; i <= root; i++) {
            if (x % i == 0)
                return false;
        }
        return true;
    }

    public static long longmax(long a, long b) {
        return Math.max(a, b);
    }

    public static long longmin(long a, long b) {
        return Math.min(a, b);
    }

    public static int intmax(int a, int b) {
        return Math.max(a, b);
    }

    public static int intmin(int a, int b) {
        return Math.min(a, b);
    }

    public static void rev(char[] ch) {
        int s = 0, e = ch.length - 1;
        while (s < e) {
            char c = ch[s];
            ch[s] = ch[e];
            ch[e] = c;
            s++;
            e--;
        }
    }

    public static void main(String args[]) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder str = new StringBuilder();
        PrintWriter out = new PrintWriter(System.out);
        int t = Integer.parseInt(br.readLine());
        while (t-- > 0) {
            // int n=Integer.parseInt(br.readLine());
            String[] lol = br.readLine().split(" ");
            // TreeMap<Integer,Integer> map=new TreeMap<>();
            // int n = Integer.parseInt(lol[0]), m = Integer.parseInt(lol[1]);
            // a = Integer.parseInt(lol[2]),
            // b = Integer.parseInt(lol[3]);
            // long n=Long.parseLong(lol[0]),k=Long.parseLong(lol[1]);
            // int a=Integer.parseInt(lol[0]),b=Integer.parseInt(lol[1]);
            int[] a = new int[4];
            for (int i = 0; i < 4; i++) {
                a[i] = Integer.parseInt(lol[i]);
            }
            int m=a[2]-a[0];
            int n=a[3]-a[1];
            long path=1L;
            if(m==0 || n==0)
            str.append("1\n");
            else
            if(n<2 || m<2){
                m++;
                n++;
                path = 1L;
                for (int i = n; i < m + n - 1; i++) {
                path *= i*1L;
                path /= (i - n + 1);
                }
                str.append(path+"\n");
            }
            else{
                String b=String.valueOf(intmax(m,n));
                String s=String.valueOf(intmin(m,n));
                long big=Long.valueOf(b);
                long small=Long.valueOf(s);
                long sum=(small*(small+1));
                big--;
                sum=sum+(big-small)*small;
                str.append((sum+1)+"\n");
            }

            // int[] freq=new int[n+1];
            // boolean[] vis=new boolean[n+1];
            // Arrays.sort(a);
        }
        out.print(str);
        out.close();
    }
}


import java.io.*;
import java.util.*;

public class codeforces {
    static class pair {
        int x;
        int y;

        public pair(int x, int y) {
            this.x = x;
            this.y = y;
        }
    }

    public static long sqrt(long x) {
        long s = 0, e = x, root = 0;
        while (s <= e) {
            long mid = (s + e) / 2;
            if (mid * mid == x)
                return mid;
            if (mid * mid < x) {
                root = mid;
                s = mid + 1;
            } else
                e = mid - 1;
        }
        return root;
    }

    public static long power(long a, long b) {
        if (a == 0 || b == 0)
            return 1L;
        long ans = power(a, b / 2);
        ans *= ans;
        if (b % 2 == 1)
            ans *= a;
        return ans;
    }

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

    public static boolean isSubsequence(String a, String b) {
        int m = a.length(), n = b.length(), i = 0, j = 0;
        while (i < m && j < n) {
            if (a.charAt(i) == b.charAt(j)) {
                i++;
            }
            j++;
        }
        return i == m;
    }

    public static boolean isprime(long x) {
        if (x == 1)
            return false;
        if (x < 4)
            return true;
        int root = (int) Math.sqrt(x);
        for (int i = 2; i <= root; i++) {
            if (x % i == 0)
                return false;
        }
        return true;
    }

    public static long longmax(long a, long b) {
        return Math.max(a, b);
    }

    public static long longmin(long a, long b) {
        return Math.min(a, b);
    }

    public static int intmax(int a, int b) {
        return Math.max(a, b);
    }

    public static int intmin(int a, int b) {
        return Math.min(a, b);
    }

    public static void rev(char[] ch) {
        int s = 0, e = ch.length - 1;
        while (s < e) {
            char c = ch[s];
            ch[s] = ch[e];
            ch[e] = c;
            s++;
            e--;
        }
    }

    public static void main(String args[]) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder str = new StringBuilder();
        PrintWriter out = new PrintWriter(System.out);
        int t = Integer.parseInt(br.readLine());
        while (t-- > 0) {
            // int n=Integer.parseInt(br.readLine());
            String[] lol = br.readLine().split(" ");
            // TreeMap<Integer,Integer> map=new TreeMap<>();
            // int n = Integer.parseInt(lol[0]), m = Integer.parseInt(lol[1]);
            // a = Integer.parseInt(lol[2]),
            // b = Integer.parseInt(lol[3]);
            // long n=Long.parseLong(lol[0]),k=Long.parseLong(lol[1]);
            // int a=Integer.parseInt(lol[0]),b=Integer.parseInt(lol[1]);
            int[] a = new int[4];
            for (int i = 0; i < 4; i++) {
                a[i] = Integer.parseInt(lol[i]);
            }
            int m=a[2]-a[0];
            int n=a[3]-a[1];
            long path=1L;
            if(m==0 || n==0)
            str.append("1\n");
            else
            if(n<2 || m<2){
                m++;
                n++;
                path = 1L;
                for (int i = n; i < m + n - 1; i++) {
                path *= i*1L;
                path /= (i - n + 1);
                }
                str.append(path+"\n");
            }
            else{
                int big=intmax(m,n);
                int small=intmin(m,n);
                long sum=(long) (small*(small+1));
                big--;
                sum=sum+(big-small)*small;
                str.append((sum+1)+"\n");
            }

            // int[] freq=new int[n+1];
            // boolean[] vis=new boolean[n+1];
            // Arrays.sort(a);
        }
        out.print(str);
        out.close();
    }
}


import java.io.*;
import java.util.*;

public class codeforces {
    static class pair {
        int x;
        int y;

        public pair(int x, int y) {
            this.x = x;
            this.y = y;
        }
    }

    public static long sqrt(long x) {
        long s = 0, e = x, root = 0;
        while (s <= e) {
            long mid = (s + e) / 2;
            if (mid * mid == x)
                return mid;
            if (mid * mid < x) {
                root = mid;
                s = mid + 1;
            } else
                e = mid - 1;
        }
        return root;
    }

    public static long power(long a, long b) {
        if (a == 0 || b == 0)
            return 1L;
        long ans = power(a, b / 2);
        ans *= ans;
        if (b % 2 == 1)
            ans *= a;
        return ans;
    }

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

    public static boolean isSubsequence(String a, String b) {
        int m = a.length(), n = b.length(), i = 0, j = 0;
        while (i < m && j < n) {
            if (a.charAt(i) == b.charAt(j)) {
                i++;
            }
            j++;
        }
        return i == m;
    }

    public static boolean isprime(long x) {
        if (x == 1)
            return false;
        if (x < 4)
            return true;
        int root = (int) Math.sqrt(x);
        for (int i = 2; i <= root; i++) {
            if (x % i == 0)
                return false;
        }
        return true;
    }

    public static long longmax(long a, long b) {
        return Math.max(a, b);
    }

    public static long longmin(long a, long b) {
        return Math.min(a, b);
    }

    public static int intmax(int a, int b) {
        return Math.max(a, b);
    }

    public static int intmin(int a, int b) {
        return Math.min(a, b);
    }

    public static void rev(char[] ch) {
        int s = 0, e = ch.length - 1;
        while (s < e) {
            char c = ch[s];
            ch[s] = ch[e];
            ch[e] = c;
            s++;
            e--;
        }
    }

    public static void main(String args[]) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder str = new StringBuilder();
        PrintWriter out = new PrintWriter(System.out);
        int t = Integer.parseInt(br.readLine());
        while (t-- > 0) {
            // int n=Integer.parseInt(br.readLine());
            String[] lol = br.readLine().split(" ");
            // TreeMap<Integer,Integer> map=new TreeMap<>();
            // int n = Integer.parseInt(lol[0]), m = Integer.parseInt(lol[1]);
            // a = Integer.parseInt(lol[2]),
            // b = Integer.parseInt(lol[3]);
            // long n=Long.parseLong(lol[0]),k=Long.parseLong(lol[1]);
            // int a=Integer.parseInt(lol[0]),b=Integer.parseInt(lol[1]);
            int[] a = new int[4];
            for (int i = 0; i < 4; i++) {
                a[i] = Integer.parseInt(lol[i]);
            }
            int m=a[2]-a[0]+1;
            int n=a[3]-a[1]+1;
            long path = 1;
            for (int i = n; i < (m + n - 1); i++) {
            path *= i;
            path /= (i - n + 1);
            }
            // int[] freq=new int[n+1];
            // boolean[] vis=new boolean[n+1];
            // Arrays.sort(a);

            str.append(path + "\n");
        }
        out.print(str);
        out.close();
    }
}


import java.util.*;
import java.io.*;
import java.math.*;

public class Main {

	private static FastReader fastReader = new FastReader();

	public static void main(String[] args) {
		Task solver = new Task();
		solver.solve();
	}

	static class Task {
		private static StringBuilder result = new StringBuilder();

		private static long getTotalPathsCount(long row, long col) {
			long pathCount = 1;
			for (long i = col; i < (row + col - 1); i++) {
				pathCount *= i;
				pathCount /= (i - col + 1);
			}
			return pathCount;
		}

		public void solve() {
			int nt = fastReader.nextInt();
			while (nt-- > 0) {
				long x1 = fastReader.nextLong();
				long y1 = fastReader.nextLong();
				long x2 = fastReader.nextLong();
				long y2 = fastReader.nextLong();
				if(x1 == x2){
					if(y2 < y1){
						result.append(0+"\n");
					}
					else{
						result.append(1+"\n");
					}
					continue;
				}
				if(y1 == y2){
					if(x2 < x1){
						result.append(0+"\n");
					}
					else{
						result.append(1+"\n");
					}
					continue;
				}
				long row = (x2-x1+1);
				long col = (y2-y1+1);
				long ans = getTotalPathsCount(row, col);
				result.append(ans+"\n");
			}
			fastReader.print(result.toString());
		}
	}

	static class FastReader {
		public BufferedReader reader;
		public StringTokenizer tokenizer;
		private static PrintWriter pw;

		public FastReader() {
			reader = new BufferedReader(new InputStreamReader(System.in));
			pw = new PrintWriter(System.out);
			tokenizer = null;
		}

		public String next() {
			while (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					tokenizer = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
			}
			return tokenizer.nextToken();
		}

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

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

		public String readLine() {
			try {
				return reader.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return null;
		}

		public void print(String str) {
			pw.print(str);
			pw.flush();
		}
	}
}


import java.util.*;
import java.io.*;
import java.math.*;

public class Main {

	private static FastReader fastReader = new FastReader();

	public static void main(String[] args) {
		Task solver = new Task();
		solver.solve();
	}

	static class Task {
		private static StringBuilder result = new StringBuilder();

		private static long getTotalPathsCount(long row, long col) {
			long pathCount = 1;
			for (long i = col; i < (row + col - 1); i++) {
				pathCount *= i;
				pathCount /= (i - col + 1);
			}
			return pathCount;
		}

		public void solve() {
			int nt = fastReader.nextInt();
			while (nt-- > 0) {
				long x1 = fastReader.nextLong();
				long y1 = fastReader.nextLong();
				long x2 = fastReader.nextLong();
				long y2 = fastReader.nextLong();
				long row = (x2-x1+1);
				long col = (y2-y1+1);
				long ans = getTotalPathsCount(row, col);
				result.append(ans+"\n");
			}
			fastReader.print(result.toString());
		}
	}

	static class FastReader {
		public BufferedReader reader;
		public StringTokenizer tokenizer;
		private static PrintWriter pw;

		public FastReader() {
			reader = new BufferedReader(new InputStreamReader(System.in));
			pw = new PrintWriter(System.out);
			tokenizer = null;
		}

		public String next() {
			while (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					tokenizer = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
			}
			return tokenizer.nextToken();
		}

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

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

		public String readLine() {
			try {
				return reader.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return null;
		}

		public void print(String str) {
			pw.print(str);
			pw.flush();
		}
	}
}


import java.util.*;
import java.io.*;
import java.math.*;

public class Main {

	private static FastReader fastReader = new FastReader();

	public static void main(String[] args) {
		Task solver = new Task();
		solver.solve();
	}

	static class Task {
		private static StringBuilder result = new StringBuilder();

		public void solve() {
			int nt = fastReader.nextInt();
			while (nt-- > 0) {
				long x1 = fastReader.nextLong();
				long y1 = fastReader.nextLong();
				long x2 = fastReader.nextLong();
				long y2 = fastReader.nextLong();
				long ans = (x2-x1)*(y2-y1) + 1;
				result.append(ans+"\n");
			}
			fastReader.print(result.toString());
		}
	}

	static class FastReader {
		public BufferedReader reader;
		public StringTokenizer tokenizer;
		private static PrintWriter pw;

		public FastReader() {
			reader = new BufferedReader(new InputStreamReader(System.in));
			pw = new PrintWriter(System.out);
			tokenizer = null;
		}

		public String next() {
			while (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					tokenizer = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
			}
			return tokenizer.nextToken();
		}

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

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

		public String readLine() {
			try {
				return reader.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return null;
		}

		public void print(String str) {
			pw.print(str);
			pw.flush();
		}
	}
}


/*
 *  created on : Tue May 26 2020
 */

import java.io.*;
import java.util.*;

public class C{
    static int celex[][];
    public static void main(String[] args) throws IOException {
        int t = in.nextInt();
        // celex = createCelex(50);
        while(t-->0){
            long x1 = in.nextInt();
            long y1 = in.nextInt();
            long x2 = in.nextInt();
            long y2 = in.nextInt();

            if(x1 == 1 && y1 == 1){
                println(Math.max(x2, y2));
            }
            else if(x1 == 1){
                println(y2 - (y1 - x1));
            }
            else{
                println(1);
            }
            // ArrayList<Integer> A = new ArrayList<>();
            // findDistinctSum(x1, y1, x2, y2, 0, A);
            // println("Total: " + A.size());
            // println(new HashSet<Integer>(A).size());
        }

        in.close();
        out.close();
    }

    static void findDistinctSum(int x1, int y1, int x2, int y2, int sum, ArrayList<Integer> set){
        if(x1 > x2 || y1 > y2){
            return;
        }

        if(x1 == x2 && y1 == y2){
            set.add(sum + celex[x1][y1]);
            return;
        }

        findDistinctSum(x1 + 1, y1, x2, y2, sum + celex[x1][x2], set);
        findDistinctSum(x1, y1 + 1, x2, y2, sum + celex[x1][x2], set);
    }

    static int[][] createCelex(int n){
        int[][] arr = new int[n][n];
        int counter = 1;
        for(int j = 0; j < n; j++){
            int i = 0;
            int k = j;
            while(i >= 0 && k >= 0 && i < n && k < n){
                arr[i--][k--] = counter++;
            }
        }

        return arr;
    }

    static int MIN = Integer.MIN_VALUE;
    static int MAX = Integer.MAX_VALUE;
    static Reader in = new Reader();
    static PrintWriter out = new PrintWriter(System.out);

    static int[] readInt(int N) throws IOException {
    	int arr[] = new int[N];
    	for(int i = 0; i < N; i++){
    		arr[i] = in.nextInt();
    	}
    	return arr;
    }

    static long[] readLong(int N) throws IOException {
    	long arr[] = new long[N];
    	for(int i = 0; i < N; i++){
    		arr[i] = in.nextLong();
    	}
    	return arr;
    }

    static String[] readString(int N) throws IOException {
    	String arr[] = new String[N];
    	for(int i = 0; i < N; i++){
    		arr[i] = in.next();
    	}
    	return arr;
    }

    static void print(Object O) {
    	out.print(O);
    }

    static void println(Object O) {
    	out.println(O);
    }

    static void println(int arr[]) {
    	for(int i = 0; i < arr.length; i++){
    		print(arr[i] + " ");
    	}
    	println("");
    }

    static void debug(Object ... O) {
    	for(Object obj: O){
    		System.out.print(obj + " ");
    	}
    	System.out.println();
    }
}

class Reader {
    BufferedReader reader;
    StringTokenizer tokenizer;

    Reader() {
        reader = new BufferedReader(new InputStreamReader(System.in));
        tokenizer = new StringTokenizer("");
    }

    String next() throws IOException {
        while (!tokenizer.hasMoreTokens() ) {
            tokenizer = new StringTokenizer(reader.readLine());
        }
        return tokenizer.nextToken();
    }

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

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

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

    String nextLine() throws IOException {
        return reader.readLine();
    }

    void close() throws IOException {
        reader.close();
    }
}


/*
 *  created on : Tue May 26 2020
 */

import java.io.*;
import java.util.*;

public class C{
    static int celex[][];
    public static void main(String[] args) throws IOException {
        int t = in.nextInt();
        //celex = createCelex(50);
        while(t-->0){
            int x1 = in.nextInt();
            int y1 = in.nextInt();
            int x2 = in.nextInt();
            int y2 = in.nextInt();

            if(x1 == 1 && y1 == 1){
                if(x2 == 1 || y2 == 1){
                    println(1);
                }
                else{
                    println(Math.max(x2, y2));
                }
            }
            else if(x1 == 1){
                if(x2 == 1 || y2 == 1){
                    println(1);
                }
                else{
                    println(y2 - (y1 - x1));
                }
            }
            else{
                println(1);
            }
            // ArrayList<Integer> A = new ArrayList<>();
            // findDistinctSum(x1 - 1, y1 - 1, x2 - 1, y2 - 1, 0, A);
            // println("Total: " + A.size());
            // println("correct ans: " + new HashSet<Integer>(A).size());
        }

        in.close();
        out.close();
    }

    static void findDistinctSum(int x1, int y1, int x2, int y2, int sum, ArrayList<Integer> set){
        if(x1 > x2 || y1 > y2){
            return;
        }

        if(x1 == x2 && y1 == y2){
            set.add(sum + celex[x1][y1]);
            return;
        }

        findDistinctSum(x1 + 1, y1, x2, y2, sum + celex[x1][x2], set);
        findDistinctSum(x1, y1 + 1, x2, y2, sum + celex[x1][x2], set);
    }

    static int[][] createCelex(int n){
        int[][] arr = new int[n][n];
        int counter = 1;
        for(int j = 0; j < n; j++){
            int i = 0;
            int k = j;
            while(i >= 0 && k >= 0 && i < n && k < n){
                arr[i--][k--] = counter++;
            }
        }

        return arr;
    }

    static int MIN = Integer.MIN_VALUE;
    static int MAX = Integer.MAX_VALUE;
    static Reader in = new Reader();
    static PrintWriter out = new PrintWriter(System.out);

    static int[] readInt(int N) throws IOException {
    	int arr[] = new int[N];
    	for(int i = 0; i < N; i++){
    		arr[i] = in.nextInt();
    	}
    	return arr;
    }

    static long[] readLong(int N) throws IOException {
    	long arr[] = new long[N];
    	for(int i = 0; i < N; i++){
    		arr[i] = in.nextLong();
    	}
    	return arr;
    }

    static String[] readString(int N) throws IOException {
    	String arr[] = new String[N];
    	for(int i = 0; i < N; i++){
    		arr[i] = in.next();
    	}
    	return arr;
    }

    static void print(Object O) {
    	out.print(O);
    }

    static void println(Object O) {
    	out.println(O);
    }

    static void println(int arr[]) {
    	for(int i = 0; i < arr.length; i++){
    		print(arr[i] + " ");
    	}
    	println("");
    }

    static void debug(Object ... O) {
    	for(Object obj: O){
    		System.out.print(obj + " ");
    	}
    	System.out.println();
    }
}

class Reader {
    BufferedReader reader;
    StringTokenizer tokenizer;

    Reader() {
        reader = new BufferedReader(new InputStreamReader(System.in));
        tokenizer = new StringTokenizer("");
    }

    String next() throws IOException {
        while (!tokenizer.hasMoreTokens() ) {
            tokenizer = new StringTokenizer(reader.readLine());
        }
        return tokenizer.nextToken();
    }

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

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

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

    String nextLine() throws IOException {
        return reader.readLine();
    }

    void close() throws IOException {
        reader.close();
    }
}


/*
 *  created on : Tue May 26 2020
 */

import java.io.*;
import java.util.*;

public class C{
    static int celex[][];
    public static void main(String[] args) throws IOException {
        int t = in.nextInt();
        celex = createCelex(50);
        while(t-->0){
            int x1 = in.nextInt();
            int y1 = in.nextInt();
            int x2 = in.nextInt();
            int y2 = in.nextInt();

            if(x1 == 1 && y1 == 1){
                if(x2 == 1 || y2 == 1){
                    println(1);
                }
                else{
                    println(Math.max(x2, y2));
                }
            }
            else if(x1 == 1){
                if(x2 == 1 || y2 == 1){
                    println(1);
                }
                else{
                    println(y2 - (y1 - x1));
                }
            }
            else{
                println(1);
            }
            ArrayList<Integer> A = new ArrayList<>();
            findDistinctSum(x1 - 1, y1 - 1, x2 - 1, y2 - 1, 0, A);
            // println("Total: " + A.size());
            println("correct ans: " + new HashSet<Integer>(A).size());
        }

        in.close();
        out.close();
    }

    static void findDistinctSum(int x1, int y1, int x2, int y2, int sum, ArrayList<Integer> set){
        if(x1 > x2 || y1 > y2){
            return;
        }

        if(x1 == x2 && y1 == y2){
            set.add(sum + celex[x1][y1]);
            return;
        }

        findDistinctSum(x1 + 1, y1, x2, y2, sum + celex[x1][x2], set);
        findDistinctSum(x1, y1 + 1, x2, y2, sum + celex[x1][x2], set);
    }

    static int[][] createCelex(int n){
        int[][] arr = new int[n][n];
        int counter = 1;
        for(int j = 0; j < n; j++){
            int i = 0;
            int k = j;
            while(i >= 0 && k >= 0 && i < n && k < n){
                arr[i--][k--] = counter++;
            }
        }

        return arr;
    }

    static int MIN = Integer.MIN_VALUE;
    static int MAX = Integer.MAX_VALUE;
    static Reader in = new Reader();
    static PrintWriter out = new PrintWriter(System.out);

    static int[] readInt(int N) throws IOException {
    	int arr[] = new int[N];
    	for(int i = 0; i < N; i++){
    		arr[i] = in.nextInt();
    	}
    	return arr;
    }

    static long[] readLong(int N) throws IOException {
    	long arr[] = new long[N];
    	for(int i = 0; i < N; i++){
    		arr[i] = in.nextLong();
    	}
    	return arr;
    }

    static String[] readString(int N) throws IOException {
    	String arr[] = new String[N];
    	for(int i = 0; i < N; i++){
    		arr[i] = in.next();
    	}
    	return arr;
    }

    static void print(Object O) {
    	out.print(O);
    }

    static void println(Object O) {
    	out.println(O);
    }

    static void println(int arr[]) {
    	for(int i = 0; i < arr.length; i++){
    		print(arr[i] + " ");
    	}
    	println("");
    }

    static void debug(Object ... O) {
    	for(Object obj: O){
    		System.out.print(obj + " ");
    	}
    	System.out.println();
    }
}

class Reader {
    BufferedReader reader;
    StringTokenizer tokenizer;

    Reader() {
        reader = new BufferedReader(new InputStreamReader(System.in));
        tokenizer = new StringTokenizer("");
    }

    String next() throws IOException {
        while (!tokenizer.hasMoreTokens() ) {
            tokenizer = new StringTokenizer(reader.readLine());
        }
        return tokenizer.nextToken();
    }

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

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

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

    String nextLine() throws IOException {
        return reader.readLine();
    }

    void close() throws IOException {
        reader.close();
    }
}


import java.io.*;
import java.util.*;

public class C {

    public static void main(String[] args) throws IOException {
        int t = in.nextInt();
        // celex = createCelex(50);
        while(t-->0){
            int x1 = in.nextInt();
            int y1 = in.nextInt();
            int x2 = in.nextInt();
            int y2 = in.nextInt();

            /*
                Consider the rectangle formed by source point and destination point as its main diagonal
                corners. The minimum sum is formed by going right and then down. And the maximum sum is formed
                by going down and then right. For every shift in the minimum sum path towards to maximum sum
                path, the sum increases by 1. Total number of shifts is given by area of rectangle formed by
                excluding first row and last column (i.e., the minimum sum path). So number of distinct sums
                is given by, ans = minimum sum path + number of possible shifts
            */

            long ans = 1 + 1L * (x2 - x1) * (y2 - y1);
            println(ans);
        }

        in.close();
        out.close();
    }

    static int celex[][];

    static void findDistinctSum(int x1, int y1, int x2, int y2, int sum, ArrayList<Integer> set){
        if(x1 > x2 || y1 > y2){
            return;
        }

        if(x1 == x2 && y1 == y2){
            set.add(sum + celex[x1][y1]);
            return;
        }

        findDistinctSum(x1 + 1, y1, x2, y2, sum + celex[x1][x2], set);
        findDistinctSum(x1, y1 + 1, x2, y2, sum + celex[x1][x2], set);
    }

    static int[][] createCelex(int n){
        int[][] arr = new int[n][n];
        int counter = 1;
        for(int j = 0; j < n; j++){
            int i = 0;
            int k = j;
            while(i >= 0 && k >= 0 && i < n && k < n){
                arr[i--][k--] = counter++;
            }
        }

        return arr;
    }

    static int MIN = Integer.MIN_VALUE;
    static int MAX = Integer.MAX_VALUE;
    static Reader in = new Reader();
    static PrintWriter out = new PrintWriter(System.out);

    static int[] readInt(int N) throws IOException {
    	int arr[] = new int[N];
    	for(int i = 0; i < N; i++){
    		arr[i] = in.nextInt();
    	}
    	return arr;
    }

    static long[] readLong(int N) throws IOException {
    	long arr[] = new long[N];
    	for(int i = 0; i < N; i++){
    		arr[i] = in.nextLong();
    	}
    	return arr;
    }

    static String[] readString(int N) throws IOException {
    	String arr[] = new String[N];
    	for(int i = 0; i < N; i++){
    		arr[i] = in.next();
    	}
    	return arr;
    }

    static void print(Object O) {
    	out.print(O);
    }

    static void println(Object O) {
    	out.println(O);
    }

    static void println(int arr[]) {
    	for(int i = 0; i < arr.length; i++){
    		print(arr[i] + " ");
    	}
    	println("");
    }

    static void debug(Object ... O) {
    	for(Object obj: O){
    		System.out.print(obj + " ");
    	}
    	System.out.println();
    }
}

class Reader {
    BufferedReader reader;
    StringTokenizer tokenizer;

    Reader() {
        reader = new BufferedReader(new InputStreamReader(System.in));
        tokenizer = new StringTokenizer("");
    }

    String next() throws IOException {
        while (!tokenizer.hasMoreTokens() ) {
            tokenizer = new StringTokenizer(reader.readLine());
        }
        return tokenizer.nextToken();
    }

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

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

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

    String nextLine() throws IOException {
        return reader.readLine();
    }

    void close() throws IOException {
        reader.close();
    }
}


import java.util.Scanner;

public class CelexUpdate {
    private static final Scanner SCANNER = new Scanner(System.in);

    public static void main(String[] args) {
        int testCase=SCANNER.nextInt();
        int x1=0,x2=0,y1=0,y2=0;
        while (testCase-->0){
            x1=SCANNER.nextInt();
            y1=SCANNER.nextInt();
            x2=SCANNER.nextInt();
            y2=SCANNER.nextInt();
            System.out.println((x2-x1)*(y2-y1)+1);
        }
    }
}


import java.util.Scanner;

public class CelexUpdate {
    private static final Scanner SCANNER = new Scanner(System.in);

    public static void main(String[] args) {
        int testCase=SCANNER.nextInt();
        long x1=0,x2=0,y1=0,y2=0;
        while (testCase-->0){
            x1=SCANNER.nextLong();
            y1=SCANNER.nextLong();
            x2=SCANNER.nextLong();
            y2=SCANNER.nextLong();
            System.out.println((x2-x1)*(y2-y1)+1);
        }
    }
}


import java.util.*;

public class solution{

   public static void main(String[] args){
     Scanner scn=new Scanner(System.in);
        int t=scn.nextInt();
        long[] res=new long[t];

        for(int i=0;i<t;i++){
            int r1=scn.nextInt();
             int c1=scn.nextInt();
            int r2=scn.nextInt();
             int c2=scn.nextInt();

                 res[i]=Math.abs(c2-c1)*Math.abs(r2-r1)+1;
          }

         for(int i=0;i<t;i++){
         System.out.println(res[i]);
         }
    }
}


import java.util.*;
public class solution{
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int test = scan.nextInt();
        while(test-->0){
            long x1 = scan.nextLong();
            long y1 = scan.nextLong();
            long x2 = scan.nextLong();
            long y2 = scan.nextLong();
            long m = x2-x1;
            long n = y2-y1;
            long sol = Math.abs(y2-y1)*Math.abs(x2-x1)+1;
            System.out.println(sol);
        }

    }
}


import java.util.*;

public class solution{

   public static void main(String[] args){
     Scanner scn=new Scanner(System.in);
        int t=scn.nextInt();
        long[] res=new long[t];

        for(int i=0;i<t;i++){
            int r1=scn.nextInt();
             int c1=scn.nextInt();
            int r2=scn.nextInt();
             int c2=scn.nextInt();

             int r=(r2-r1);
             int c=(c2-c1);

             if(r==0 ||c==0){
              res[i]=1;
             }else{
                 res[i]=r*c+1;
             }
          }

         for(int i=0;i<t;i++){
         System.out.println(res[i]);
         }
    }
}


import java.util.*;

public class solution{

    public static int function(int[][] strg){
        int n=strg.length-1;
        int m=strg[0].length-1;
        for(int i=n;i>=0;i--){
            for(int j=m;j>=0;j--){
                if(i==n && j==m){
                    strg[i][j]=1;
                }else if(i==n || j==m){
                    strg[i][j]=1;
                }else{
                    strg[i][j]=strg[i+1][j]+strg[i][j+1];
                }
            }
        }

        return strg[0][0];
     }

    public static void main(String[] args){
     Scanner scn=new Scanner(System.in);
        int t=scn.nextInt();
        int[] res=new int[t];

        for(int i=0;i<t;i++){
            int r1=scn.nextInt();
             int c1=scn.nextInt();
            int r2=scn.nextInt();
             int c2=scn.nextInt();

             int r=(r2-r1)+1;
             int c=(c2-c1)+1;

             if(r==1 ||c==1){
              res[i]=1;
             }else{
                 int[][] strg=new int[r][c];
                 res[i]=function(strg);
             }
          }

         for(int i=0;i<t;i++){
         System.out.println(res[i]);
         }
    }
}


public class solution{

   public static void main(String[] args){
     Scanner scn=new Scanner(System.in);
        int t=scn.nextInt();
        long[] res=new long[t];

        for(int i=0;i<t;i++){
            int r1=scn.nextInt();
             int c1=scn.nextInt();
            int r2=scn.nextInt();
             int c2=scn.nextInt();

                 res[i]=Math.abs(c2-c1)*Math.abs(r2-r1)+1;
          }

         for(int i=0;i<t;i++){
         System.out.println(res[i]);
         }
    }
}


import java.util.*;

public class solution{

   public static void main(String[] args){
     Scanner scn=new Scanner(System.in);
        int t=scn.nextInt();
        long[] res=new long[t];

        for(int i=0;i<t;i++){
            int r1=scn.nextInt();
             int c1=scn.nextInt();
            int r2=scn.nextInt();
             int c2=scn.nextInt();

             if(r==0 ||c==0){
              res[i]=1;
             }else{
                 res[i]=Math.abs(c2-c1)*Math.abs(r2-r1)+1;
             }
          }

         for(int i=0;i<t;i++){
         System.out.println(res[i]);
         }
    }
}


import java.util.*;

public class solution{

   public static void main(String[] args){
     Scanner scn=new Scanner(System.in);
        int t=scn.nextInt();
        long[] res=new long[t];

        for(int i=0;i<t;i++){
            long r1=scn.nextLong();
             long c1=scn.nextLong();
            long r2=scn.nextLong();
             long c2=scn.nextLong();

                 res[i]=Math.abs(c2-c1)*Math.abs(r2-r1)+1;
          }

         for(int i=0;i<t;i++){
         System.out.println(res[i]);
         }
    }
}


import java.util.Scanner;

public class C_Celex_Update {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int t = sc.nextInt();
		while(t-- > 0) {
			long x1 = sc.nextInt();
			long y1 = sc.nextInt();
			long x2 = sc.nextInt();
			long y2 = sc.nextInt();
			System.out.println((x2 - x1) * (y2 - y1) + 1);
		}
		sc.close();
	}

}


import java.util.Scanner;

public class C_Celex_Update {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int t = sc.nextInt();
		while(t-- > 0) {
			int x1 = sc.nextInt();
			int y1 = sc.nextInt();
			int x2 = sc.nextInt();
			int y2 = sc.nextInt();
			if(x1 > x2 || y1 > y2) System.out.println("0");
			else if(x1 == x2 || y1 == y2) System.out.println("1");
			else {
				int[] n = new int[y2 - y1];
				for(int i = 0; i <= x2 - x1; i++) {
					n[0] = i + 1;
					for(int j = 1; j < y2 - y1; j++)
						n[j] += n[j - 1];
				}
				System.out.println(n[y2 - y1 - 1]);
			}
		}
		sc.close();
	}

}


import java.util.Scanner;

public class C_Celex_Update {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int t = sc.nextInt();
		while(t-- > 0) {
			int x1 = sc.nextInt();
			int y1 = sc.nextInt();
			int x2 = sc.nextInt();
			int y2 = sc.nextInt();
			System.out.println((x2 - x1) * (y2 - y1) + 1);
		}
		sc.close();
	}

}


/* package codechef; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
public class Codechef
{
	public static void main (String[] args) throws java.lang.Exception
	{
		Scanner sc = new Scanner(System.in);
		int t = sc.nextInt();
		while(t-- > 0) {
		    long x1 = sc.nextLong();
		    long y1 = sc.nextLong();
		    long x2 = sc.nextLong();
		    long y2 = sc.nextLong();
		    System.out.println(((x2 - x1) * (y2 - y1)) + 1);
		}
	}
}


/* package codechef; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
public class Codechef
{
	public static void main (String[] args) throws java.lang.Exception
	{
		Scanner sc = new Scanner(System.in);
		int t = sc.nextInt();
		while(t-- > 0) {
		    int x1 = sc.nextInt();
		    int y1 = sc.nextInt();
		    int x2 = sc.nextInt();
		    int y2 = sc.nextInt();
		    System.out.println(((x2 - x1) * (y2 - y1)) + 1);
		}
	}
}


/* package codechef; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
public class Codechef
{
	public static void main (String[] args) throws java.lang.Exception
	{
		Scanner sc = new Scanner(System.in);
		int t = sc.nextInt();
		while(t-- > 0) {
		    int x1 = sc.nextInt();
		    int y1 = sc.nextInt();
		    int x2 = sc.nextInt();
		    int y2 = sc.nextInt();
		    int r = x2 - x1 + 1;
		    int c = y2 - y1 + 1;
		    int[][] arr = new int[r][c];
		    for(int i = 0; i < r; i++) {
		        arr[i][0] = 1;
		    }
		    for(int i = 0; i < c; i++) {
		        arr[0][i] = 1;
		    }
		    for(int i = 1; i < r; i++) {
		        for(int j = 1; j < c; j++) {
		            arr[i][j] = arr[i - 1][j] + arr[i][j - 1];
		        }
		    }
		    System.out.println(arr[r - 1][c - 1]);
		}
	}
}


import java.util.*;
import java.io.*;
public class Main
{
    public static void main(String args[])throws Exception
    {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        PrintWriter pw=new PrintWriter(System.out);
        int t=Integer.parseInt(br.readLine());
        for(int x=0;x<t;x++)
        {
            //int n=Integer.parseInt(br.readLine());
            String str[]=br.readLine().split(" ");
            int x1=Integer.parseInt(str[0]);
            int y1=Integer.parseInt(str[1]);
            int x2=Integer.parseInt(str[2]);
            int y2=Integer.parseInt(str[3]);
            pw.println((x2-x1)*(y2-y1)+1);
        }
        pw.flush();
        pw.close();
    }
}


import java.util.*;
import java.io.*;
public class Main
{
    public static void main(String args[])throws Exception
    {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        PrintWriter pw=new PrintWriter(System.out);
        int t=Integer.parseInt(br.readLine());
        for(int x=0;x<t;x++)
        {
            //int n=Integer.parseInt(br.readLine());
            String str[]=br.readLine().split(" ");
            int x1=Integer.parseInt(str[0]);
            int y1=Integer.parseInt(str[1]);
            int x2=Integer.parseInt(str[2]);
            int y2=Integer.parseInt(str[3]);
            if(x1==x2||y1==y2)
            pw.println(1);
            else
            {
                int minx=Math.min(x1,x2);
                int miny=Math.min(y1,y2);
                int maxx=Math.max(x1,x2);
                int maxy=Math.max(y1,y2);
                pw.println((maxx-minx+1)*(maxy-miny+1)-(maxx-minx+1)*(maxy-miny+1)/2);
            }
        }
        pw.flush();
        pw.close();
    }
}


import java.util.*;
import java.io.*;
public class Main
{
    public static void main(String args[])throws Exception
    {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        PrintWriter pw=new PrintWriter(System.out);
        int t=Integer.parseInt(br.readLine());
        for(int x=0;x<t;x++)
        {
            //int n=Integer.parseInt(br.readLine());
            String str[]=br.readLine().split(" ");
            int x1=Integer.parseInt(str[0]);
            int y1=Integer.parseInt(str[1]);
            int x2=Integer.parseInt(str[2]);
            int y2=Integer.parseInt(str[3]);
            if(x1==x2||y1==y2)
            pw.println(1);
            else
            {
                int minx=Math.min(x1,x2);
                int miny=Math.min(y1,y2);
                int maxx=Math.max(x1,x2);
                int maxy=Math.max(y1,y2);
                if(x2-x1==1&&y2-y1==1)
                pw.println(2);
                else
                pw.println((maxx-minx+1)*(maxy-miny+1)-3);
            }
        }
        pw.flush();
        pw.close();
    }
}


import java.util.*;
import java.io.*;
public class Main
{
    public static void main(String args[])throws Exception
    {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        PrintWriter pw=new PrintWriter(System.out);
        int t=Integer.parseInt(br.readLine());
        for(int x=0;x<t;x++)
        {
            //int n=Integer.parseInt(br.readLine());
            String str[]=br.readLine().split(" ");
            int x1=Integer.parseInt(str[0]);
            int y1=Integer.parseInt(str[1]);
            int x2=Integer.parseInt(str[2]);
            int y2=Integer.parseInt(str[3]);
            pw.println((long)(x2-x1)*(long)(y2-y1)+1);
        }
        pw.flush();
        pw.close();
    }
}


import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;

public class C {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    StringTokenizer tokenizer = null;
    int totalCases, testNum;

    PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));

    void solve() throws IOException {
        int x1 = ni();
        int y1 = ni();
        int x2 = ni();
        int y2 = ni();
        out.println((x2 - x1) * (y2 - y1) + 1);
    }

    public static void main(String[] args) throws IOException {
        new C().execute();
    }

    void debug(Object... os) {
        System.out.println(Arrays.deepToString(os));
    }

    int ni() throws IOException {
        return Integer.parseInt(ns());
    }

    long nl() throws IOException {
        return Long.parseLong(ns());
    }

    double nd() throws IOException {
        return Double.parseDouble(ns());
    }

    String ns() throws IOException {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            tokenizer = new StringTokenizer(br.readLine());
        }
        return tokenizer.nextToken();
    }

    String nline() throws IOException {
        tokenizer = null;
        return br.readLine();
    }

    void execute() throws IOException {
        totalCases = ni();
        for (testNum = 1; testNum <= totalCases; testNum++) {
            if (!input()) {
                break;
            }
            solve();
        }
        out.close();
    }

    boolean input() throws IOException {
        return true;
    }

}


import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;

public class C {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    StringTokenizer tokenizer = null;
    int totalCases, testNum;

    PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));

    void solve() throws IOException {
        int x1 = ni();
        int y1 = ni();
        int x2 = ni();
        int y2 = ni();
        if (x1 == x2) {
            out.println(1);
            return;
        }
        long[][] dp = new long[x2][y2];
        for (int j = 1; j < y2; j++) {
            dp[0][j] = 1;
        }
        for (int i = 1; i < x2; i++) {
            dp[i][0] = 1;
        }
        for (int i = 1; i < x2; i++) {
            for (int j = 1; j < y2; j++) {
                dp[i][j] = dp[i-1][j] + dp[i][j-1];
            }
        }
        out.println(dp[x2 - 1][y2 - 1] - dp[x1 - 1][y1 - 1]);
    }

    public static void main(String[] args) throws IOException {
        new C().execute();
    }

    void debug(Object... os) {
        System.out.println(Arrays.deepToString(os));
    }

    int ni() throws IOException {
        return Integer.parseInt(ns());
    }

    long nl() throws IOException {
        return Long.parseLong(ns());
    }

    double nd() throws IOException {
        return Double.parseDouble(ns());
    }

    String ns() throws IOException {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            tokenizer = new StringTokenizer(br.readLine());
        }
        return tokenizer.nextToken();
    }

    String nline() throws IOException {
        tokenizer = null;
        return br.readLine();
    }

    void execute() throws IOException {
        totalCases = ni();
        for (testNum = 1; testNum <= totalCases; testNum++) {
            if (!input()) {
                break;
            }
            solve();
        }
        out.close();
    }

    boolean input() throws IOException {
        return true;
    }

}


import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;

public class C {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    StringTokenizer tokenizer = null;
    int totalCases, testNum;

    PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));

    void solve() throws IOException {
        long x1 = ni();
        long y1 = ni();
        long x2 = ni();
        long y2 = ni();
        out.println((x2 - x1) * (y2 - y1) + 1);
    }

    public static void main(String[] args) throws IOException {
        new C().execute();
    }

    void debug(Object... os) {
        System.out.println(Arrays.deepToString(os));
    }

    int ni() throws IOException {
        return Integer.parseInt(ns());
    }

    long nl() throws IOException {
        return Long.parseLong(ns());
    }

    double nd() throws IOException {
        return Double.parseDouble(ns());
    }

    String ns() throws IOException {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            tokenizer = new StringTokenizer(br.readLine());
        }
        return tokenizer.nextToken();
    }

    String nline() throws IOException {
        tokenizer = null;
        return br.readLine();
    }

    void execute() throws IOException {
        totalCases = ni();
        for (testNum = 1; testNum <= totalCases; testNum++) {
            if (!input()) {
                break;
            }
            solve();
        }
        out.close();
    }

    boolean input() throws IOException {
        return true;
    }

}


import java.util.Scanner;

public class Celex_Update {

	public static void main(String[] args) {
		// TODO Auto-generated method stub

		Scanner scan = new Scanner(System.in);

		int t = scan.nextInt();

		for(int i=0; i < t; i++) {

			int x1 = scan.nextInt();
			int y1 = scan.nextInt();
			int x2 = scan.nextInt();
			int y2 = scan.nextInt();

			// path through the smallest sum (i.e. the outside-most path)
			long sum = 1;

			// all possible paths through the rectange below
			// each path increases the sum by one, and therefore is valid

			long diff1 = x2-x1;
			long diff2 = y2-y1;
			sum += diff1*diff2;
			System.out.println(sum);
		}

	}

}


import java.util.Scanner;

public class Celex_Update {

	public static void main(String[] args) {
		// TODO Auto-generated method stub

		Scanner scan = new Scanner(System.in);

		int t = scan.nextInt();

		for(int i=0; i < t; i++) {

			int x1 = scan.nextInt();
			int y1 = scan.nextInt();
			int x2 = scan.nextInt();
			int y2 = scan.nextInt();

			// path through the smallest sum (i.e. the outside-most path)
			int sum = 1;

			// all possible paths through the rectange below
			// each path increases the sum by one, and therefore is valid

			sum += (x2-x1)*(y2-y1);
			System.out.println(sum);
		}

	}

}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author @maxximus
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskC solver = new TaskC();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskC {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int t, n, m, a, b, c, x, y;

            t = in.nextInt();
            for (int i = 0; i < t; i++) {

                int x1 = in.nextInt();
                int y1 = in.nextInt();

                int x2 = in.nextInt();
                int y2 = in.nextInt();

                out.println((x2 - x1) * (y2 - y1) + 1L);
            }
        }

    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author @maxximus
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskC solver = new TaskC();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskC {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int t, n, m, a, b, c, x, y;

            t = in.nextInt();
            for (int i = 0; i < t; i++) {

                int x1 = in.nextInt();
                int y1 = in.nextInt();

                int x2 = in.nextInt();
                int y2 = in.nextInt();

                out.println((x2 - x1) * 1L * (y2 - y1) + 1);
            }
        }

    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author @maxximus
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskC solver = new TaskC();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskC {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int t, n, m, a, b, c, x, y;

            t = in.nextInt();
            for (int i = 0; i < t; i++) {

                int x1 = in.nextInt();
                int y1 = in.nextInt();

                int x2 = in.nextInt();
                int y2 = in.nextInt();

                out.println((x2 - x1) * (y2 - y1) + 1);
            }
        }

    }
}


import java.io.*;
import java.util.*;

import javax.swing.text.html.MinimalHTMLWriter;

public class tr1 {
	static PrintWriter out;
	static StringBuilder sb;
	static int n, m, k, ones, zeros;
	static long mod = 998244353;
	static Boolean[][] memo;
	static String s;
	static ArrayList<Integer>[] ad;
	static long inf = Long.MAX_VALUE;
	static int N = 1 << 20 + 1;
	static int[] color;
	static ArrayList<Integer> o, z;
	static int[] ans, head;

	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		out = new PrintWriter(System.out);
		int t = sc.nextInt();
		while (t-- > 0) {
			long x1 = sc.nextInt();
			long y1 = sc.nextInt();
			long x2 = sc.nextInt();
			long y2 = sc.nextInt();
			long st1 = (x1 + 1) * x1 / 2;
			long st2 = (x2 + 1) * x2 / 2;
//			long pos1 = ((y1 + x1 - 2) * (y1 + x1 - 1) / 2) - ((x1 - 1) * x1 / 2) + st1;
//			long pos2 = ((y2 + x2 - 2) * (y2 + x2 - 1) / 2) - ((x2 - 1) * x2 / 2) + st2;
//			long max = pos1 + (x2 + y1 - 1) * (x2 + y1) / 2 - (x1 + y1 - 1) * (x1 + y1) / 2 + (x2 + y2 - 1);
//			long min = 0;
			long lev = x2 - x1 + 1;
			long leh = y2 - y1 + 1;
			long inc = 0;
			if (lev == leh) {
				inc = lev - 1;
				inc += (lev - 2) * (lev - 1);
			} else {
				long min = Math.min(lev, leh);
				inc = min - 1;
				inc += (min - 2) * (min - 1);
				long add = Math.max(leh, lev) - 1 - (min-1);
				inc+=add*(min-1);
			}
			if (x1 == x2 || y2 == y1) {
				out.println(1);
				continue;
			}
			out.println(inc + 1);
		}
		out.flush();
	}

	static class Scanner {
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream system) {
			br = new BufferedReader(new InputStreamReader(system));
		}

		public Scanner(String file) throws Exception {
			br = new BufferedReader(new FileReader(file));
		}

		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public String nextLine() throws IOException {
			return br.readLine();
		}

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

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

		public char nextChar() throws IOException {
			return next().charAt(0);
		}

		public Long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		public int[] nextArrInt(int n) throws IOException {
			int[] a = new int[n];
			for (int i = 0; i < n; i++)
				a[i] = nextInt();
			return a;
		}

		public long[] nextArrLong(int n) throws IOException {
			long[] a = new long[n];
			for (int i = 0; i < n; i++)
				a[i] = nextLong();
			return a;
		}

		public boolean ready() throws IOException {
			return br.ready();
		}

		public void waitForInput() throws InterruptedException {
			Thread.sleep(3000);
		}
	}
}