It's raining outside. Farmer Johnson's bull Ben wants some rain to water his flowers. Ben nails two wooden boards on the wall of his barn. Shown in the pictures below, the two boards on the wall just look like two segments on the plane, as they have the same width.
Your mission is to calculate how much rain these two boards can collect.

The first line contains the number of test cases.
Each test case consists of 8 integers not exceeding 10,000 by absolute value, *x*_{1}, *y*_{1}, *x*_{2}, *y*_{2}, *x*_{3}, *y*_{3}, *x*_{4}, *y*_{4}. (*x*_{1}, *y*_{1}), (*x*_{2}, *y*_{2}) are the endpoints of one board, and (*x*_{3}, *y*_{3}), (*x*_{4}, *y*_{4}) are the endpoints of the other one.

提交代码