See Problem N for PDF statements.
In computational geometry, polygon triangulation is the decomposition of a polygonal area into a set of triangles. Over time, a number of algorithms have been proposed to triangulate a polygon. One of the special cases is the triangulation of the monotone polygon. It is proved that a monotone polygon can be triangulated in linear time.
A polygon

is called monotone with respect to a straight line

, if every line orthogonal to

intersects the boundary of

at most twice. For many practical purposes, this definition may be extended to allow cases when some edges of

are orthogonal to

.
A monotone polygon can be split into two
monotone polygonal chains. A polygonal chain is a connected series of line segments, which can be specified by a sequence of points

. Similarly, a polygonal chain

is called monotone with respect to a straight line

, if every line orthogonal to

intersects

at most once, or some line segments of

are orthogonal to

.
In this problem, we denote a
directed line 
by a point

and a direction vector

where

. We define a polygonal chain

to be monotone with respect to a directed line

if the following condition is satisfied:
- For any
,
.
Here,

means the coordinate of the point

, and "

'' means the dot product of vectors.
Now given the

points in a polygonal chain

, please determine whether there exists a directed line

such that

is monotone with respect to

.