#include<cstdio>
#include<cstring>
#include<cmath>
#include<iostream>
#include<algorithm>
#include<set>
#include<map>
#include<stack>
#include<vector>
#include<queue>
#include<string>
#include<sstream>
#define eps 1e-9
#define ALL(x) x.begin(),x.end()
#define INS(x) inserter(x,x.begin())
#define FOR(i,j,k) for(int i=j;i<=k;i++)
#define MAXN 105
#define MAXM 40005
#define INF 0x3fffffff
using namespace std;
typedef long long LL;
struct Point
{
    double x, y;
    Point(double x=0, double y=0) :x(x),y(y) {}
};
typedef Point Vector;

Point read_point(void)
{
    double x, y;
    scanf("%lf%lf", &x, &y);
    return Point(x, y);
}

const double EPS = 1e-10;

Vector operator + (Vector A, Vector B)    { return Vector(A.x + B.x, A.y + B.y); }

Vector operator - (Vector A, Vector B)    { return Vector(A.x - B.x, A.y - B.y); }

Vector operator * (Vector A, double p)    { return Vector(A.x*p, A.y*p); }

Vector operator / (Vector A, double p)    { return Vector(A.x/p, A.y/p); }

bool operator < (const Point& a, const Point& b)
{ return a.x < b.x || (a.x == b.x && a.y < b.y); }

int dcmp(double x)
{ if(fabs(x) < EPS) return 0; else return x < 0 ? -1 : 1; }

bool operator == (const Point& a, const Point& b)
{ return dcmp(a.x-b.x) == 0 && dcmp(a.y-b.y) == 0; }

double Dot(Vector A, Vector B)
{ return A.x*B.x + A.y*B.y; }

double Length(Vector A)    { return sqrt(Dot(A, A)); }


double Angle(Vector A, Vector B)
{ return acos(Dot(A, B) / Length(A) / Length(B)); }


double Cross(Vector A, Vector B)
{ return A.x*B.y - A.y*B.x; }


double Area2(Point A, Point B, Point C)
{ return Cross(B-A, C-A); }


Vector VRotate(Vector A, double rad)
{
    return Vector(A.x*cos(rad) - A.y*sin(rad), A.x*sin(rad) + A.y*cos(rad));
}


Point PRotate(Point A, Point B, double rad)
{
    return A + VRotate(B-A, rad);
}


Vector Normal(Vector A)
{
    double l = Length(A);
    return Vector(-A.y/l, A.x/l);
}


Point GetLineIntersection(Point P, Vector v, Point Q, Vector w)
{
    Vector u = P - Q;
    double t = Cross(w, u) / Cross(v, w);
    return P + v*t;
}

double DistanceToLine(Point P, Point A, Point B)
{
    Vector v1 = B - A, v2 = P - A;
    return fabs(Cross(v1, v2)) / Length(v1);
}


double DistanceToSegment(Point P, Point A, Point B)
{
    if(A == B)    return Length(P - A);
    Vector v1 = B - A, v2 = P - A, v3 = P - B;
    if(dcmp(Dot(v1, v2)) < 0)    return Length(v2);
    else if(dcmp(Dot(v1, v3)) > 0)    return Length(v3);
    else return fabs(Cross(v1, v2)) / Length(v1);
}


Point GetLineProjection(Point P, Point A, Point B)
{
    Vector v = B - A;
    return A + v * (Dot(v, P - A) / Dot(v, v));
}


bool SegmentProperIntersection(Point a1, Point a2, Point b1, Point b2)
{
    double c1 = Cross(a2-a1, b1-a1), c2 = Cross(a2-a1, b2-a1);
    double c3 = Cross(b2-b1, a1-b1), c4 = Cross(b2-b1, a2-b1);
    return dcmp(c1)*dcmp(c2)<0 && dcmp(c3)*dcmp(c4)<0;
}


bool OnSegment(Point P, Point a1, Point a2)
{
    Vector v1 = a1 - P, v2 = a2 - P;
    return dcmp(Cross(v1, v2)) == 0 && dcmp(Dot(v1, v2)) < 0;
}


double PolygonArea(Point* P, int n)
{
    double ans = 0.0;
    for(int i = 1; i < n - 1; ++i)
        ans += Cross(P[i]-P[0], P[i+1]-P[0]);
    return ans/2;
}

const double PI = acos(-1.0);
struct Line
{
    Point p;
    Vector v;
    double ang;
    Line()    { }
    Line(Point p, Vector v): p(p), v(v)    { ang = atan2(v.y, v.x); }
    Point point(double t)
    {
        return p + v*t;
    }
    bool operator < (const Line& L) const
    {
        return ang < L.ang;
    }
};


int isPointInPolygon(Point P, Point* Poly, int n)
{
    int wn;
    for(int i = 0; i < n; ++i)
    {
        if(OnSegment(P, Poly[i], Poly[(i+1)%n]))    return -1; 
        int k = dcmp(Cross(Poly[(i+1)%n] - Poly[i], P - Poly[i]));
        int d1 = dcmp(Poly[i].y - P.y);
        int d2 = dcmp(Poly[(i+1)%n].y - P.y);
        if(k > 0 && d1 <= 0 && d2 > 0)    wn++;
        if(k < 0 && d2 <= 0 && d1 > 0)    wn--;
    }
    if(wn != 0)  return 1;
    return 0;
}

int ConvexHull(Point* p, int n, Point* ch)
{
    sort(p, p +n);
    int m = 0;
    for(int i = 0; i < n; ++i)
    {
        while(m > 1 && Cross(ch[m-1] - ch[m-2], p[i] - ch[m-2]) <= 0)    m--;
        ch[m++] = p[i];
    }
    int k = m;
    for(int i = n-2; i >= 0; --i)
    {
        while(m > k && Cross(ch[m-1] - ch[m-2], p[i] - ch[m-2]) <= 0)    m--;
        ch[m++] = p[i];
    }
    if(n > 1)    m--;
    return m;
}

bool ConvexHullIntersection(Point *ch1,int t1,Point *ch2,int t2)
{
    double angle[MAXN],x;
    int i,j,k,m;
    if(t1==1)return true;
    if(t1==2)
    {
        for(i=0;i<t2;i++)
        {
            k=dcmp(Cross(ch1[1]-ch1[0],ch2[i]-ch1[0]));
            if(k==0&&Dot(ch1[1]-ch1[0],ch2[i]-ch1[0])>0)
            {
                if(Length(ch2[i]-ch1[0])<Length(ch1[1]-ch1[0]))break;
            }
        }
        if(i<t2)return false;
        if(t2==2&&SegmentProperIntersection(ch1[0],ch1[1],ch2[0],ch2[1]))return false;
        return true;
    }

    angle[0]=0;
    for(i=2;i<t1;i++)
    angle[i-1]=Angle(ch1[1]-ch1[0],ch1[i]-ch1[0]);
    for(i=0;i<t2;i++)
    {
        j=dcmp(Cross(ch1[1]-ch1[0],ch2[i]-ch1[0]));
        if(j<0||(j==0&&Dot(ch1[1]-ch1[0],ch2[i]-ch1[0])<0))continue;
        j=dcmp(Cross(ch1[t1-1]-ch1[0],ch2[i]-ch1[0]));
        if(j>0||(j==0&&Dot(ch1[t1-1]-ch1[0],ch2[i]-ch1[0])<0))continue;
        x=Angle(ch1[1]-ch1[0],ch2[i]-ch1[0]);
        m=lower_bound(angle,angle+t1-1,x)-angle;
        if(m==0)j=0;
        else j=m-1;
        k=dcmp(Cross(ch1[j+1]-ch2[i],ch1[j+2]-ch2[i]));
        if(k>=0)break;
    }
    if(i<t2)return false;
    return true;
}



int i,j,k,n,m,x,y,T,ans,big,cas,num,len;
bool flag;
Point a[105],b[105],cha[105],chb[105];

int main()
{
	while (scanf("%d%d",&n,&m),n+m)
	{
		
		
		for (i=0;i<n;i++)
		{
			scanf("%lf%lf",&a[i].x,&a[i].y);
		}
		
		int as=ConvexHull(a,n,cha); 
		
		for (i=0;i<m;i++)
		{
			scanf("%lf%lf",&b[i].x,&b[i].y);
		}
		
		
		int bs=ConvexHull(b,m,chb); 
		
		if (ConvexHullIntersection(cha,as,chb,bs)&&ConvexHullIntersection(chb,bs,cha,as)) printf("YES\n");
		else printf("NO\n");
		
	}
	
	return 0;
}

Measured memory_bytes: 1280