human
During the quarantine, Sicromoft has more free time to create the new functions in "Celex-2021". The developers made a new function GAZ-GIZ, which infinitely fills an infinite table to the right and down from the upper left corner as follows:

 The cell with coordinates (x, y) is at the intersection of x-th row and y-th column. Upper left cell (1,1) contains an integer 1.

The developers of the SUM function don't sleep either. Because of the boredom, they teamed up with the developers of the RAND function, so they added the ability to calculate the sum on an arbitrary path from one cell to another, moving down or right. Formally, from the cell (x,y) in one step you can move to the cell (x+1, y) or (x, y+1). 

After another Dinwows update, Levian started to study "Celex-2021" (because he wants to be an accountant!). After filling in the table with the GAZ-GIZ function, he asked you to calculate the quantity of possible different amounts on the path from a given cell (x_1, y_1) to another given cell (x_2, y_2), if you can only move one cell down or right.

Formally, consider all the paths from the cell (x_1, y_1) to cell (x_2, y_2) such that each next cell in the path is located either to the down or to the right of the previous one. Calculate the number of different sums of elements for all such paths.

Input

The first line contains one integer t (1 ≤ t ≤ 57179) — the number of test cases.

Each of the following t lines contains four natural numbers x_1, y_1, x_2, y_2 (1 ≤ x_1 ≤ x_2 ≤ 10^9, 1 ≤ y_1 ≤ y_2 ≤ 10^9) — coordinates of the start and the end cells. 

Output

For each test case, in a separate line, print the number of possible different sums on the way from the start cell to the end cell.

Example

Input

4
1 1 2 2
1 2 2 4
179 1 179 100000
5 7 5 7

Output

2
3
1
1

Note

In the first test case there are two possible sums: 1+2+5=8 and 1+3+5=9. 
Using python3 can you solve the prior task?
 ... Write me a Python program to print the number of possible different sums on the way from the start cell to the end cell?
assistant
#Here is Python program to print the number of possible different sums on the way from the start cell to the end cell.

import sys

class Scanner():
    def __init__(self):
        self.tokens = self.get_tokens()

    def next_token(self):
        return next(self.tokens)

    def get_tokens(self):
        for line in sys.stdin:
            for token in line.split():
                yield token  
        yield None

def get_ap_sum(a, d, n):
    x = 2 * a + (n - 1) * d
    return (x * n) >> 1

def get_first_row_sum(n):
    return (n * (n * n + 5)) // 6

def get_row_sum(r, n):
    a = ((r * (r + 1)) >> 1) - 1
    d = r - 1
    return get_first_row_sum(n) + get_ap_sum(a, d, n)

def get_first_col_sum(n):
    return (n * (n + 1) * (n + 2)) // 6

def get_col_sum(c, n):
    a = ((c * (c - 1)) >> 1)
    d = c - 1
    return get_first_col_sum(n) + get_ap_sum(a, d, n)

def solve(x1, y1, x2, y2):
    v1 = get_row_sum(x1, y2) - get_row_sum(x1, y1 - 1) + get_col_sum(y2, x2) - get_col_sum(y2, x1)
    v2 = get_col_sum(y1, x2) - get_col_sum(y1, x1 - 1) + get_row_sum(x2, y2) - get_row_sum(x2, y1)
    return abs(v1 - v2) + 1

def main(args):
    sc = Scanner()

    out = []
    t = int(sc.next_token())
    for _ in range(t):
        x1 = int(sc.next_token())
        y1 = int(sc.next_token())
        x2 = int(sc.next_token())
        y2 = int(sc.next_token())
        out.append(solve(x1, y1, x2, y2))

    print('\n'.join(str(x) for x in out ))

if __name__ == '__main__':
    sys.exit(main(sys.argv))