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.
__author__ = 'Adam'

import sys

n, m = sys.stdin.readline().split(' ')
n, m = int(n), int(m)

#data = sys.stdin.read().split('\n')
data = []
for i in range(n+m):
    data.append(sys.stdin.readline().replace('\n', ''))
#print(data)
data = data[:n+m]
misha = [[int(i.split(' ')[0]), int(i.split(' ')[1])] for i in data[:n]]
sasha = [[int(i.split(' ')[0]), int(i.split(' ')[1])] for i in data[m:]]

#print('dddd')
#print(misha, sasha)
#print()
misha_x = misha_y = []
for i in misha:
    misha_x.append(i[0])
    misha_y.append(i[1])
center_m = [(max(misha_x) + min(misha_x))/2.0, (max(misha_y) + min(misha_y))/2.0]
radius_m = max([abs(i) for i in [max(misha_x), min(misha_x), max(misha_y), min(misha_y)]])

sasha_x = sasha_y = []
for i in sasha:
    sasha_x.append(i[0])
    sasha_y.append(i[1])
center_s = [(max(sasha_x) + min(sasha_x))/2.0, (max(sasha_y) + min(sasha_y))/2.0]
radius_s = max([abs(i) for i in [max(sasha_x), min(sasha_x), max(sasha_y), min(sasha_y)]])

#print(center_m, center_s)
#print(radius_m, radius_s)

if radius_m <= radius_s:
    radius = radius_m
    center = center_m
else:
    radius = radius_s
    center = center_s

flag = True
for i in misha:
    if (i[0]-center[0])**2 + (i[1]-center[1])**2 < (radius+0.1)**2:
        pass
    else:
        flag = False
        break

for i in sasha:
    if (i[0]-center[0])**2 + (i[1]-center[1])**2 > (radius+0.1)**2:
        pass
    else:
        flag = False
        break

if flag:
    print('YES')
else:
    print('NO')
