#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <complex>
#include <stack>
#include <queue>
#include <numeric>
#include <iomanip>

#define REP(i,n) for(i=0; i < (n); i++)
#define REPONE(i, n) for(i=1; i <= (n); i++)
#define LOOP(n) for(int loopCount=1; loopCount <= (n); loopCount++)
#define ITER(c) __typeof((c).begin())
#define EACH(c,it) for(ITER(c) it =(c).begin(); it!=(c).end(); it++)
#define SZ(c) ((int) (c).size())
#define ALL(c) c.begin(), c.end()
#define SUM(c) accumulate(ALL(c), 0)
#define EXIST(c,v) (find(ALL(c), (v)) != (c).end())
#define PB push_back
#define MP make_pair

using namespace std;
static const double EPS = 1e-8;
static const double PI = 3.141592653589793238462643383279;

/*
typedef complex<double> point;

template<typename T>
int sig2(T x){
    if(abs(x)<EPS) return 0;
    if(x>0) return 1;
    return -1;
}

double det(point p1, point p2, point q){
    return p2.real()*q.imag()+p1.real()*p2.imag()+q.real()*p1.imag()
            -p2.real()*p1.imag()-q.real()*p2.imag()-q.imag()*p1.real();
}
int main(){
    int i,j,k,n,m;
    double x,y,bxma,byma,bxmi,bymi,wxma,wyma,wxmi,wymi;
    bool yes;
    while(scanf("%d%d",&n,&m)){
        if(n==0 && m==0) break;
        bxma=byma=wxma=wyma=-1e99;
        bxmi=bymi=wxmi=wymi=1e99;
        yes=false;
        vector<point> bs(n), ws(m);
        REP(i,n){
            scanf("%lf%lf",&x,&y);
            bs[i]=point(x,y);
            bxma=max(bxma, x);
            byma=max(byma, y);
            bxmi=min(bxmi, x);
            bymi=min(bymi, y);
        }
        REP(i,m){
            scanf("%lf%lf",&x,&y);
            ws[i]=point(x,y);
            wxma=max(wxma, x);
            wyma=max(wyma, y);
            wxmi=min(wxmi, x);
            wymi=min(wymi, y);
        }
        if(bxma<wxmi||bxmi>wxma||byma<wymi||bymi>wyma){
            printf("YES\n");
            continue;
        }
        if(n==1 && m==1){
            printf("YES\n");
            continue;
        }
        int w=0, b;
        REP(i,n)for(j=i+1;j<n;j++){
            w = 0;
            REP(k,m) w+=sig2(det(bs[i],bs[j],ws[k]));
            if(abs(w)<m)break;
            REP(k,n)if(sig2(det(bs[i],bs[j],bs[k]))==sig2(w))break;
            if(k==n){
                yes = true;
                goto end;
            }
        }
        swap(n,m);
        swap(bs,ws);
        REP(i,n)for(j=i+1;j<n;j++){
            w = 0;
            REP(k,m) w+=sig2(det(bs[i],bs[j],ws[k]));
            if(abs(w)<m)break;
            REP(k,n)if(sig2(det(bs[i],bs[j],bs[k]))==sig2(w))break;
            if(k==n){
                yes = true;
                goto end;
            }
        }
        REP(i,n)REP(j,m){
            w = b = 0;
            REP(k,m) w+=sig2(det(bs[i],ws[j],ws[k]));
            if(abs(w)<m-1)break;
            REP(k,n) b+=sig2(det(bs[i],ws[j],bs[k]));
            if(abs(b)<n-1)break;
            if(w*b<0){
                yes = true;
                goto end;
            }
        }
        end:;
        if(yes)printf("YES\n");
        else printf("NO\n");
    }
    return 0;
}
*/

#define N 80000

int main(){
    int i,j,n,m;
    double bma,bmi,wma,wmi,ang=PI/N,tmp;
    static double bxs[100], wxs[100], bys[100], wys[100];
    while(scanf("%d%d",&n,&m)){
        if(n==0 && m==0) break;
        REP(i,n)scanf("%lf%lf",bxs+i,bys+i);
        REP(i,m)scanf("%lf%lf",wxs+i,wys+i);
        REP(i,N){
            bma=wma=-1e99;
            bmi=wmi=1e99;
            REP(j,n){
                tmp = cos(ang*i)*bxs[j]-sin(ang*i)*bys[j];
                if(tmp<bmi)bmi=tmp;
                if(tmp>bma)bma=tmp;
            }
            REP(j,m){
                tmp = cos(ang*i)*wxs[j]-sin(ang*i)*wys[j];
                if(bmi<tmp && tmp<bma) goto mark;
                if(tmp<wmi)wmi=tmp;
                if(tmp>wma)wma=tmp;
            }
            if((bma < wmi - EPS) || (wma < bmi - EPS)) break;
            mark:;
        }
        if(i==N)printf("NO\n");
        else printf("YES\n");
    }
    return 0;
}

Measured memory_bytes: 888