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.
import math

class Point:
    def __init__(self, x=0, y=0):
        self.x, self.y = x, y
    
    def __add__(self, o):
        return Point(self.x + o.x, self.y + o.y)
    
    def __sub__(self, o):
        return Point(self.x - o.x, self.y - o.y)
    
    def __pow__(self, o):
        return self.x ** o + self.y ** o
    
    def __abs__(self):
        return math.sqrt(self ** 2)
    
    def __mul__(self, o):
        return Point(self.x * o, self.y * o)
    
    def __truediv__(self, o):
        return Point(self.x / o, self.y / o)
    
    def distance(self, o):
        return abs(self - o)

def calr(a, b, c):
    k1 = (b.y - a.y) / (b.x - a.x)
    k2 = (c.y - b.y) / (c.x - b.x)
    x1 = (a.x + b.x) / 2
    y1 = (a.y + b.y) / 2
    x2 = (b.x + c.x) / 2
    y2 = (b.y + c.y) / 2
    x = (k1 * k2 * (y2 - y1) + k1 * x2 - k2 * x1) / (k1 - k2)
    y = (k2 * y2 - k1 * y1 + x2 - x1) / (k2 - k1)
    r2 = (x - a.x) ** 2 + (y - a.y) ** 2
    return Point(x, y), r2

class Circle:
    def __init__(self):
        self.c = Point()
        self.r = 0
        self.points = list()
    
    def insert(self, x, y):
        self.points.append(Point(x, y))
    
    def calculate(self):
        l = 0
        points = [Point(),Point()]
        tpoints = list()
        for i in range(len(self.points)):
            for j in range(i):
                length = self.points[i].distance(self.points[j])
                if length > l:
                    l = length
                    points = [self.points[i], self.points[j]]
        for i in self.points:
            if i not in points:
                a = points[0].distance(i)
                b = points[1].distance(i)
                if a ** 2 + b ** 2 > l ** 2:
                    tpoints.append(i)
        if len(tpoints) == 0:
            self.r = l / 2
            self.c = (points[0] + points[1]) / 2
        else:
            r = 0
            rpoint = Point()
            for i in tpoints:
                pos, pr2 = calr(points[0], points[1], i)
                if pr2 > r ** 2:
                    r = math.sqrt(pr2)
                    rpoint = pos
            self.c = rpoint
            self.r = r
    
    def isin(self, x):
        l = self.c.distance(x)
        if l <= self.r:
            return True
        else:
            return False

state1 = True
state2 = True
circle1 = Circle()
circle2 = Circle()
m, n = input().split(' ')
m, n = int(m), int(n)
for i in range(m):
    x, y = input().split(' ')
    circle1.insert(int(x), int(y))
for i in range(n):
    x, y = input().split(' ')
    circle2.insert(int(x), int(y))
if m == 1 or n == 1:
    print('YES')
    exit()
circle1.calculate()
circle2.calculate()
for i in circle2.points:
    if circle1.isin(i):
        state1 = False
for i in circle1.points:
    if circle2.isin(i):
        state2 = False
if state1 or state2:
    print('YES')
else:
    print('NO')
