Berlanders like to eat cones after a hard day. Misha Square and Sasha Circle are local authorities of Berland. Each of them controls its points of cone trade. Misha has *n* points, Sasha — *m*. Since their subordinates constantly had conflicts with each other, they decided to build a fence in the form of a circle, so that the points of trade of one businessman are strictly inside a circle, and points of the other one are strictly outside. It doesn't matter which of the two gentlemen will have his trade points inside the circle.

Determine whether they can build a fence or not.
The first line contains two integers *n* and *m* (1 ≤ *n*, *m* ≤ 10000), numbers of Misha's and Sasha's trade points respectively.

The next *n* lines contains pairs of space-separated integers *M*<sub class="lower-index">*x*</sub>, *M*<sub class="lower-index">*y*</sub> ( - 10<sup class="upper-index">4</sup> ≤ *M*<sub class="lower-index">*x*</sub>, *M*<sub class="lower-index">*y*</sub> ≤ 10<sup class="upper-index">4</sup>), coordinates of Misha's trade points.

The next *m* lines contains pairs of space-separated integers *S*<sub class="lower-index">*x*</sub>, *S*<sub class="lower-index">*y*</sub> ( - 10<sup class="upper-index">4</sup> ≤ *S*<sub class="lower-index">*x*</sub>, *S*<sub class="lower-index">*y*</sub> ≤ 10<sup class="upper-index">4</sup>), coordinates of Sasha's trade points.

It is guaranteed that all *n* + *m* points are distinct.
def dist(x1, y1, x2, y2):
    return ((y1-y2)**2+(x1-x2)**2)**(1/2)
n, m = list(map(int, input().split()))
mishamax = 0
mishamin = float('inf')
sashamax = 0
sashamin = float('inf')
mishax, mishay = 0, 0
sashax, sashay = 0, 0
misha = []
sasha = []
for i in range(n):
    x, y = list(map(int, input().split()))
    misha.append((x, y))
    if i == 0:
        mishax, mishay = x, y
    else:
        mishax += x
        mishay += y
mishax /= n
mishay /= n

for i in range(m):
    x, y = list(map(int, input().split()))
    sasha.append((x, y))
    if i == 0:
        sashax = x
        sashay = y
    else:
        sashax += x
        sashay += y
sashax /= m
sashay /= m

for i in misha:
    mishamin = min(mishamin, dist(i[0], i[1], mishax, mishay))
    mishamax = max(mishamax, dist(i[0], i[1], mishax, mishay))
for i in sasha:
    sashamax = max(sashamax, dist(i[0], i[1], sashax, sashay))
    sashamin = min(sashamin, dist(i[0], i[1], sashax, sashay))

if mishamin > sashamax or sashamin > mishamax:
    print('YES')
else:
    print('NO')
