Furrows
On the parquet floor of Physics-Math School №932, a vandal has carved several grooves using a chisel, all running parallel to the walls. The school administration has decided to paint all these grooves blue. The head painter, having prepared everything needed for the task, is now considering whether it is possible to paint all the grooves without lifting the roller from the floor and without painting any groove more than once. Your task is to determine if such a continuous painting is feasible.
Input
The first line of the input contains the integer N (1 ≤ N ≤ 100), which represents the number of grooves created by the vandal. This is followed by 4N integers, detailing the coordinates of the endpoints of each groove (-1000 ≤ X_1, Y_1, X_2, Y_2 ≤ 1000).
Output
On the first line of the output, print NO if it is not possible to paint all the grooves as described, and YES if it is possible.