You have a number of sticks, which are thin enough to be considered as segments on the XY plane.
Your task is simple: count the number of grid points that are covered by at least one segment.
输入解释
The first line contains a single integer T (T <= 10), the number of test cases. Each case begins with an integer n (1 <= n <= 500), the number of segments. Each of the following n lines contains four real numbers x1, y1, x2, y2, denoting a segment (x1,y1)-(x2,y2). All of x1, y1, x2, y2 will be no larger than 10000 in their absolute values, and will contain at most 4 digits after decimal point.
输出解释
For each test case, print the case number and the number of grid points.