Theodore Roosevelt#2299

Theodore Roosevelt

1 sekunda
128 megabajtov
Lahko

"Theodore Roosevelt" — the flagship of the Kukuland fleet. The sworn enemies of Kukuland, the Flat-Earthers, decided to destroy it. They learned that "Theodore Roosevelt" is represented by a convex polygon with vertices, and the coordinates of all its vertices are known to them. Then they launched ballistic missiles and recorded the coordinates of their explosion points. According to the calculations of the Flat-Earthers' headquarters, "Theodore Roosevelt" will be destroyed if at least missiles hit it. Determine whether the Flat-Earthers managed to destroy the ship.

Vhod

The first line contains integers and k~(3 \le n \le 10^5, 0 \le k \le m \le 10^5). The next lines contain the coordinates of the polygon vertices in counterclockwise order. The following lines contain the coordinates of the explosion points. All coordinates are integers with absolute values not exceeding 10^9.

Izhod

Print "YES" if at least points lie inside the polygon, and "NO" otherwise.

Primeri

Primer 1

Loading
Loading