かとん--Katon
Long long ago, when Wodex was a child, he lived happily. Unfortunately, one day, The nightmare begins...
Some ninjas attacked his village and the village fell into a big fire.Most of villagers were died. Witnessed it, Wodex was very afraid but angry. So, Wodex wanted to revenge.To be stronger, he needed to flee out of the village first. But owing to the fire, some roads were blocked.
Now, there will be some roads which can be walked. Each road was straight, and the endpoint is P1 (x1, y1), P2 (x2, y2).
x and y is the coordinate.
Now he was on the road A, can he ran to road B? He can ran one road to another road if these two roads are connected. The number of road is from 1 to N.
It is very urgent, help him!
For each question, if she can run from road A to road B, print 'YES', otherwise print 'NO'.