Processing math: 100%
Point location - ReimuOJ: Reimu Online Judge

Point location

Time limit: 1000 ms
Memory limit: 256 MB
Given a convex polygon of n of vertices and a point A(xA,xB). Determine if A lies inside the polygon (lying on an edge is also counted as lying inside). ### Input - The first lines contains three integers n,xA,xB. - The next n lines, each line contains a point (x,y). The points are listed in the clockwise order. ### Output - Print YES if the point lies inside the polygon, otherwise print NO. ### Constraints - 1≤n≤1000. - −109≤x,y≤109. ### Example Input: 42100011230 Output: YES