The first line contains the only integer![]()
— the number of vertices of polygon
. Then
lines contain pairs of integers
![]()
— coordinates of the
-th vertex of polygon
. The vertices are given in the clockwise order.
The next line contains a single integer![]()
— the number of vertices of polygon
. Then following
lines contain pairs of integers
![]()
— the coordinates of the
-th vertex of polygon
. The vertices are given in the clockwise order.
The coordinates of the polygon's vertices are separated by a single space. It is guaranteed that polygonsand
are non-degenerate, that polygon
is strictly convex, that polygon
has no self-intersections and self-touches and also for each polygon no three consecutively following vertices are located on the same straight line.
Print on the only line the answer to the problem — if polygonis strictly inside polygon
, print "YES", otherwise print "NO" (without the quotes).