The Dragon of the Wawel Castle, following the conflict with the local Shoemakers’ Guild, decided to move its hunting grounds out of Kraków, to a less hostile neighborhood. Now it is bringing havoc and terror to the peaceful and serene Kingdom of Bytes.
In the Kingdom of Bytes there are n rivers and each of them flows along a straight line (that is, you may think of the Kingdom as the Euclidean plane divided by infinite lines). No three rivers have a common point. The rivers divide the Kingdom into some districts.
Fortunately, there are m valiant knights in the Kingdom. Each of them has taken his post and swore an oath to protect his district. The Kingdom is thus protected for evermore... or is it?
It is known that Dragon will not attack a district which has at least one knight inside. The knights, however, are famous for their courage in battle, not for their intelligence. They may have forgotten to protect some of the districts.
Given a map of the Kingdom and the knights’ positions, determine whether all districts are protected.