It will give you several undirected line(s), you
should pass them all and only once.
输入
This problem contains several cases. The first line of each case is an integer N (0 < N <= 500), indicates the number of lines. Then it follows N line(s). Each line contains 4 integers: The two coordinates of the undirected line. (-500 <= x1, y1, x2, y2 <= 500)
输出
For each case, if the galaxy can be linked by the rules above, print YES. Or print NO.