/**** Geometrical Library (complex class version) ****/

#include<cmath>
#include<vector>
#include<complex>
#include<algorithm>

#define	EPS	1e-9

enum {CCW=1,CW=-1,ON=0};

#define	pb	push_back

using namespace std;

typedef	complex<double>	Point;

class Line:public vector<Point>{
public:
	Line(){}
	Line(const Point &a,const Point &b){
		pb(a),pb(b);
	}
};

class Segment:public Line{
public:
	Segment(){}
	Segment(const Point &a,const Point &b):Line(a,b){}
};

typedef	vector<Point>	Polygon;

namespace std{
	bool operator <(const Point &a,const Point &b){
		return (real(a)==real(b))?(imag(a)<imag(b)):(real(a)<real(b));
	}
	bool operator >(const Point &a,const Point &b){
		return b<a;
	}
}

double dot(const Point &a,const Point &b){
	return real(a)*real(b)+imag(a)*imag(b);
}

double cross(const Point &a,const Point &b){
	return real(a)*imag(b)-imag(a)*real(b);
}

int ccw(const Point &a,Point b,Point c){
	b-=a,c-=a;
	double rotdir=cross(b,c);
	if(rotdir>EPS)		return CCW;
	if(rotdir<-EPS)		return CW;
	return ON;
}

Polygon ConvexHull(vector<Point> ps){	// Graham Scan
	int n=ps.size();
	sort(ps.begin(),ps.end());

	vector<Point> ch_u(n);
	int n_u=0;
	for(int i=n-1;i>=0;i--){
		ch_u[n_u++]=ps[i];
		while(n_u>=3 && ccw(ch_u[n_u-3],ch_u[n_u-2],ch_u[n_u-1])!=CCW){
			ch_u[n_u-2]=ch_u[n_u-1];
			n_u--;
		}
	}

	vector<Point> ch_l(n);
	int n_l=0;
	for(int i=0;i<n;i++){
		ch_l[n_l++]=ps[i];
		while(n_l>=3 && ccw(ch_l[n_l-3],ch_l[n_l-2],ch_l[n_l-1])!=CCW){
			ch_l[n_l-2]=ch_l[n_l-1];
			n_l--;
		}
	}

	Polygon ch;
	for(int i=0;i<n_u-1;i++)	ch.pb(ch_u[i]);
	for(int i=0;i<n_l-1;i++)	ch.pb(ch_l[i]);
	return ch;
}

inline void calc_abc(const Line &l,double &a,double &b,double &c){	// l : ax+by+c=0
	a=imag(l[0])-imag(l[1]);
	b=real(l[1])-real(l[0]);
	c=cross(l[0],l[1]);
}

bool intersect(const Line &l,const Line &m,Point *p=NULL){
	// this routine also returns true in case "M is on L", etc,.
	if(abs(cross(l[1]-l[0],m[1]-m[0]))>EPS
	|| abs(cross(l[1]-l[0],m[0]-l[0]))<EPS){
		if(p){
			double a1,b1,c1,a2,b2,c2;
			calc_abc(l,a1,b1,c1);
			calc_abc(m,a2,b2,c2);
			double det=a1*b2-a2*b1;
			if(abs(det)<EPS)	*p=l[0];	// l==m
			else				*p=Point(b1*c2-b2*c1,a2*c1-a1*c2)/det;
		}
		return true;
	}
	return false;
}

bool intersect(const Segment &s,const Segment &t,Point *p=NULL){
	if(max(real(s[0]),real(s[1]))<min(real(t[0]),real(t[1]))
	|| max(real(t[0]),real(t[1]))<min(real(s[0]),real(s[1]))
	|| max(imag(s[0]),imag(s[1]))<min(imag(t[0]),imag(t[1]))
	|| max(imag(t[0]),imag(t[1]))<min(imag(s[0]),imag(s[1])))	return false;

	if(ccw(s[0],s[1],t[0])*ccw(s[0],s[1],t[1])<=0
	&& ccw(t[0],t[1],s[0])*ccw(t[0],t[1],s[1])<=0){
		if(p){
			double a1,b1,c1,a2,b2,c2;
			calc_abc(s,a1,b1,c1);
			calc_abc(t,a2,b2,c2);
			double det=a1*b2-a2*b1;
			if(abs(det)<EPS){	// s is parallel to t
				Point q[3]={s[0],s[1],t[0]};
				for(int i=0;i<3;i++){
					if(dot(q[i]-s[0],q[i]-s[1])<EPS && dot(q[i]-t[0],q[i]-t[1])<EPS){
						*p=q[i];
						break;
					}
				}
			}
			else	*p=Point(b1*c2-b2*c1,a2*c1-a1*c2)/det;
		}
		return true;
	}
	return false;
}

/**************** Library END ****************/

#include<cstdio>

#define	rep(i,n)	for(int i=0;i<n;i++)

bool contain(const Polygon &g,const Point &p){
	int n=g.size();
	int dir=ccw(g[n-1],g[0],p);
	if(dir==ON)	return (dot(g[0]-p,g[n-1]-p)<EPS);
	for(int i=0;i<n-1;i++){
		int a=ccw(g[i],g[i+1],p);
		if(a==ON)	return (dot(g[i+1]-p,g[i]-p)<EPS);
		if(a!=dir)	return false;
	}
	return true;
}

bool contain(const Polygon &g1,const Polygon &g2){
	rep(i,g2.size()) if(contain(g1,g2[i])) return true;
	return false;
}

bool intersect(const Polygon &g1,const Polygon &g2){
	int n1=g1.size(),n2=g2.size();
	rep(i,n1)rep(j,n2){
		if(intersect(Segment(g1[i],g1[(i+1)%n1]),Segment(g2[j],g2[(j+1)%n2])))	return true;
	}
	return contain(g1,g2) || contain(g2,g1);
}

int main(){
	for(int nb,nw;scanf("%d%d",&nb,&nw),nb;){
		vector<Point> b(nb),w(nw);
		rep(i,nb){ int x,y; scanf("%d%d",&x,&y); b[i]=Point(x,y); }
		rep(i,nw){ int x,y; scanf("%d%d",&x,&y); w[i]=Point(x,y); }

		Polygon ch_b,ch_w;
		ch_b=(nb>1)?ConvexHull(b):b;
		ch_w=(nw>1)?ConvexHull(w):w;
		puts(intersect(ch_b,ch_w)?"NO":"YES");
	}
}

Measured memory_bytes: 0