Galaxy is an Android Game.
It's easy to play:
Just to link the stars in one stroke.
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.