{"trustable":true,"sections":[{"title":"","value":{"format":"MD","content":"$N$ line segments (numbered $1$ through $N$) are placed on the $2D$-plane. For each valid $i$, the $i$-th segment starts at $\\vec{A_i} \u003d (x_i, y_i)$ and ends at $\\vec{B_i} \u003d (X_i, Y_i)$. Line segments can move with a velocity of magnitude 1 unit/sec along the direction of vector $(\\vec{A_i} - \\vec{B_i})$ or $(\\vec{B_i} - \\vec{A_i})$. \r\n\r\nAt the time $t \u003d 0$, all segments start moving for each valid $i$. You need to assign a direction to the movement of each segment (not necessarily the same for all segments), such that there is no time from $t \u003d 0$ to $t \u003d 10^{10000}$ (both inclusive) when any two segments touch or intersect each other. \r\n\r\nDecide if it is possible to assign directions to the segments in such a way that the above condition is satisfied. \r\n\r\n### Input:\r\n- The first line of input contains a single integer $T$, the number of testcases.\r\n- The first line of each test case contains a single integer $N$.\r\n- $N$ lines follow,. For each $i$ ($1 \\le i \\le N$), the $i$-th of these lines contains four space-separated integers $x_i$, $y_i$, $X_i$, $Y_i$.\r\n\r\n### Output:\r\nFor each test case, print a single line containing the string `\"YES\"` if it is possible to assign the directions in a valid way or `\"NO\"` if it is impossible.\r\n\r\n### Constraints \r\n- $1 \\leq T \\leq 1000$\r\n- $1 \\leq N \\leq 2000$\r\n- Sum of $N$ over all testcases $\\leq 2000$\r\n- Absolute value of coordinates of all points $\\leq 10^6$\r\n- All input points in a single testcase are distinct\r\n\r\n### Sample Input:\r\n\t2\r\n\t3\r\n\t0 0 0 10\r\n\t1 10 5 10\r\n\t6 0 6 10\r\n\t4\r\n\t0 0 0 10\r\n\t1 10 5 10\r\n\t6 0 6 10\r\n\t-2 -1 8 -1\r\n\r\n### Sample Output:\r\n\tYES\r\n\tNO\r\n\r\n\t\r\n### EXPLANATION:\r\n\u003cstrong\u003eExample case 1:\u003c/strong\u003e There are two ways to assign directions to segments, one of them is:\r\n\u003ca href\u003d\"https://s3.amazonaws.com/codechef_shared/download/ICPCKH19/SEGDIR2Example1.png\"\u003e\r\n \u003cimg src\u003d\"CDN_BASE_URL/bb1a1dde351cdc6549e248965219cf28?v\u003d1715304429\" width\u003d\"300\" height\u003d\"400\" \u003e\r\n\u003c/a\u003e\r\n\r\n\u003cstrong\u003eExample case 2:\u003c/strong\u003e : There is no valid way to assign directions to segments."}}]}