#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rep1(i,n) for(int i=1;i<=(int)(n);i++)
#define all(c) c.begin(),c.end()
#define pb push_back
#define fs first
#define sc second
#define show(x) cout << #x << " = " << x << endl
#define chmin(x,y) x=min(x,y)
#define chmax(x,y) x=max(x,y)
using namespace std;
double ax[100],ay[100],bx[100],by[100];
double dx[4]={1e-6,0,-1e-6,0},dy[4]={0,1e-6,0,-1e-6},eps=1e-9;
int N,M;
bool solve(){
	rep(i,N) cin>>ax[i]>>ay[i];
	rep(i,M) cin>>bx[i]>>by[i];
	rep(i,N) rep(j,M){
		double xx=ax[i]-bx[j],yy=ay[i]-by[j];
		rep(d,4){
			double x=xx+dx[d],y=yy+dy[d];
			double amn=1e50,amx=-1e50,bmn=1e50,bmx=-1e50;
			rep(k,N){
				double z=ay[k]*x-ax[k]*y;
				chmin(amn,z);
				chmax(amx,z);
			}
			rep(k,M){
				double z=by[k]*x-bx[k]*y;
				chmin(bmn,z);
				chmax(bmx,z);
			}
			if(amx+eps<bmn||bmx+eps<amn) return 1;
		}
	}
	return 0;
}
int main(){
	while(true){
		cin>>N>>M;
		if(N==0) break;
		if(solve()) puts("YES");
		else puts("NO");
	}
}