Cake
Winnie the Pooh, Rabbit and Piglet came to visit Christopher Robin on his birthday. The main gift is a huge round honey cake with four candles. However, in order to eat a cake, it must first be cut into four pieces. Knowing how much Winnie the Pooh loves honey, one could expect that he would immediately take the largest piece of cake for himself and would probably get stuck in the doorway, as happened when he and Piglet went to visit Rabbit.
To avoid this, Christopher Robin decided to cut the cake into four identical parts, and to emphasize the solemnity, because this is not an ordinary cake, but a festive one, and not to complicate cutting, the cake needs to be cut with two perpendicular cuts passing through its center, and on each of the resulting pieces there should be exactly one candle each. At the same time, so that no one gets an incomplete candle and does not get offended, Christopher Robin wants the cuts not to go through any candle.
Input
The center of the cake is taken as the origin. The first line contains the whole radius r (1 ≤ r ≤ 10^9
) of the cake. The next four lines contain the coordinates of the candles x[i]
, y[i]
. It is guaranteed that all candles are strictly in the cake.
Output
Print YES if Christopher Robin can cut the cake the way he wants, and NO if he can't.