#include <iostream>  
#include <cstdio>  
#include <cstring>  
#include <algorithm>  
#include <cmath>  
using namespace std;  
  
struct Point  
{  
    double x,y;  
    Point (double x=0, double y=0) :x(x),y(y) {}  
    void show() { cout<<"("<<x<<","<<y<<")"<<endl; }  
};  
typedef Point Vector;  
  
bool operator < (const Point& A, const Point& B )  
{  
    return A.x < B.x || (A.x == B.x && A.y < B.y);  
}  
Vector operator - ( Point A, Point B) { return Vector(A.x-B.x, A.y-B.y); }  
double Cross(Vector A, Vector B) { return A.x*B.y - B.x*A.y; }  
  
const double eps = 1e-10;  
int dcmp(double x)  
{  
    if(fabs(x) < eps) return 0;  
    return x>0? 1: -1;  
}  
  
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];  
    }  
    ///霑倩ヲ∵隼荳?ク狗函謌仙、夊セケ蠖「縲? 
    ch[m++] = ch[0];  
    if(n > 1) m--;  
    return m;  
}  
  
Point black[120],white[120],cw[120],cb[120];  
int nb,nw,n,m;  
  
void reset()  
{  
    memset(black,0,sizeof(black));  
    memset(white,0,sizeof(white));  
    memset(cw,0,sizeof(cw));  
    memset(cb,0,sizeof(cb));  
}  
  
bool SideCross(Point a1, Point a2, Point b1, Point b2)  
{  
    double c1 = Cross(a2 - a1, b1 - a1), c2 = Cross(a2 - a1, b2 - a1),  
           c3 = Cross(b2 - b1, a1 - b1), c4 = Cross(b2 - b1, a2 - b1);  
    return dcmp(c1)*dcmp(c2)<0 && dcmp(c3)*dcmp(c4)<0;  
}  
  
bool pInConvex(Point a, Point* ch, int n)  
{  
    int i;  
    if(n==3)  
    {  
        if(a.x < min(ch[0].x, ch[1].x) || a.x > max(ch[0].x, ch[1].x)) return 0;  
        if(a.y < min(ch[0].y, ch[1].y) || a.y > max(ch[0].y, ch[1].y)) return 0;  
    }  
    for(i=1;i<n;i++)  
    {  
        if(Cross( ch[i]-ch[i-1], a-ch[i-1] ) < 0 ) return 0;  
    }  
    return 1;  
}  
  
int solve()  
{  
    int i,j;  
    if(n==1&&m==1) return 1;  
    else if(n==1)  
    {  
        ///謇セ逋ス蟄仙?蛹?、夊セケ蠖「縲ょ愛譁ュ霑吩クェ鮟大ュ先弍蜷ヲ蝨ィ逋ス蛹??  
        nw=ConvexHull(white, m, cw);  
        if(pInConvex(black[0], cw, nw)) return 0;  
    }  
    else if(m==1)  
    {  
        ///謇セ鮟大ュ仙?蛹?、夊セケ蠖「縲ょ愛譁ュ霑吩クェ逋ス蟄先弍蜷ヲ蝨ィ鮟大桁蜀? 
        nb=ConvexHull(black, n, cb);  
        if(pInConvex(white[0], cb, nb)) return 0;  
    }  
    else  
    {  
        ///謇セ鮟醍區蜃ク蛹?、夊セケ蠖「縲ょ愛譁ュ譏ッ蜷ヲ譛臥コソ谿オ逶ク莠、謌也せ蝨ィ蜿ヲ荳?クェ蜃ク蛹??縲? 
        nb=ConvexHull(black, n, cb);  
        nw=ConvexHull(white, m, cw);  
        for(i=1;i<nb;i++)  
        {  
            for(j=1;j<nw;j++)  
                if(SideCross( cb[i], cb[i-1], cw[j] ,cw[j-1] )) return 0;  
        }  
        for(i=0;i<n;i++)  
            if(pInConvex(black[i], cw, nw)) return 0;  
        for(i=0;i<m;i++)  
            if(pInConvex(white[i], cb, nb)) return 0;  
    }  
    return 1;  
}  
  
int main()  
{  
    int i,tx,ty;  
    while(cin>>n>>m,n||m)  
    {  
        reset();  
        for(i=0;i<n;i++)  
        {  
            cin>>tx>>ty;  
            black[i]=Point(tx,ty);  
        }  
        for(i=0;i<m;i++)  
        {  
            cin>>tx>>ty;  
            white[i]=Point(tx,ty);  
        }  
        int ans=solve();  
        if(ans)  
            cout<<"YES"<<endl;  
        else  
            cout<<"NO"<<endl;  
    }  
    return 0;  
}  

Measured memory_bytes: 1164