#define _USE_MATH_DEFINES
#include <iostream>
#include <memory>
#include <memory.h>
#include <fstream>
#include <cmath>
#include <numeric>
#include <vector>
#include <stack>
#include <string>
#include <queue>
#include <sstream>
#include <cstdlib>
#include <cassert>
#include <cstdio>
#include <cstring>
#include <map>
#include <set>
#include <iomanip>
#include <list>
#include <cctype>
#include <algorithm>
#include <complex>
using namespace std;

typedef complex<double> xy_t;
typedef pair<xy_t, xy_t> line;
typedef long long ll;
typedef pair<int, int> P;
typedef pair<double, double> Pd;
typedef pair<int, P> PP;
typedef pair<int, PP> PPP;
const int INF = 1 << 29;
const double EPS = 1E-10;

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

vector<xy_t> black;
vector<xy_t> white;
xy_t p;

double cross(const xy_t &a, const xy_t &b){
	return imag(a * conj(b));
}
double dot(const xy_t &a, const xy_t &b){
	return real(a * conj(b));
}

int ccw(xy_t a, xy_t b, xy_t c){
	b -= a;
	c -= a;
	if(cross(b, c) > 0) return 1;
	if(cross(b, c) < 0) return -1;
	if(dot(b, c) < 0) return 2;
	if(norm(b) < norm(c)) return -2;
	return 0;
}

bool intersectSS(const line &s, const line &t){
	return ccw(s.first, s.second, t.first) * ccw(s.first, s.second, t.second) <= 0 && 
		ccw(t.first, t.second, s.first) * ccw(t.first, t.second, s.second) <= 0;
}

int insidePol(const vector<xy_t> &Pol, const xy_t &pos){
	int n = Pol.size();
	bool f = false;
	for(int i = 0; i < n; i++){
		xy_t a = Pol[i] - pos;
		xy_t b = Pol[(i+1)%n] - pos;
		if(imag(a) > imag(b)) swap(a, b);
		if(imag(a) < EPS && 0 < imag(b)){
			if(cross(a, b) > 0) f = !f;
		}
		if(abs(cross(a, b)) < EPS && dot(a, b) < EPS) return 2; 
	}
	return f ? 1 : 0;
}

bool comp(const xy_t &p1, const xy_t &p2){
	return cross(p1 - p, p2 - p) < 0;
}

void output(const vector<xy_t> &pol){
	cout <<"****************" << endl;
	rep(i, (int)pol.size()) cout << pol[i] << endl;
	cout << "******************" << endl;
}

vector<xy_t> convex_hull(vector<xy_t> &pol){
	int n = pol.size();
	int m = 0;
	vector<xy_t> res;
	if(n <= 2) return pol;
	rep(i, n){
		if(pol[i].imag() < pol[m].imag()) m = i;
	}
	rep(i, n){
		if(abs(pol[i].imag() - pol[m].imag()) < EPS && pol[i].real() > pol[m].real()) m = i; 
	}
	swap(pol[0], pol[m]);
	p = pol[0];
	sort(pol.begin() + 1, pol.end(), comp);
	//output(pol);
	res.push_back(pol[0]);
	res.push_back(pol[1]);
	for(int i = 2; i < n; i++){
		int sz = res.size();
		while(sz >= 2 && ccw(res[sz-1], res[sz-2], pol[i])  <= 0) res.pop_back(), sz--;
		res.push_back(pol[i]);
	}

	return res;
}

bool intersect(const vector<xy_t> &A, const vector<xy_t> &B){
	int n = A.size();
	int m = B.size();
	//Óªð··é©
	rep(i, n)rep(j, m){
		if(intersectSS(line(A[i], A[(i+1)%n]), line(B[j], B[(j+1)%m]))) return true;
	}
	// _ªà¤É é©
	rep(i, n){
		if(insidePol(B, A[i])) return true;
	}
	rep(i, m){
		if(insidePol(A, B[i])) return true;
	}
	return false;
}

int main(){
	int n, m;
	double x, y;
	while(cin >> n >> m && (n || m)){
		white.clear();
		black.clear();
		rep(i, n){
			cin >> x >>y;
			black.push_back(xy_t(x, y));
		}
		rep(i, m){
			cin >> x >> y;
			white.push_back(xy_t(x, y));
		}
		black = convex_hull(black);
		white = convex_hull(white);
	
		if(!intersect(black, white)){
			cout << "YES" << endl;
		}else{
			cout << "NO" << endl;
		}
	}
	return 0;
}

Measured memory_bytes: 980