#include <cstdio>
#include <iostream>
#include <iomanip>
#include <cstring>
#include <cstdlib>
#include <string>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <stack>
#include <algorithm>
#include <cmath>
#include <ctime>
#define INF 1000000007
#define MP make_pair
const int NUM = 100010;
const double eps = 1e-10, pi = acos(-1.0);
using namespace std;
typedef pair <int, int> P;
typedef long long LL;
typedef unsigned long long uLL;
inline int sgn(LL x)
{
	if(x < 0)return -1;
	return x > 0 ? 1 : 0;
}
class Point
{
public:
	LL x, y;
	Point(LL _x = 0, LL _y = 0): x(_x), y(_y) {}
	Point operator - (const Point b)const {return Point(x - b.x, y - b.y);}
	LL operator * (const Point b) const {return x * b.x + y * b.y;}
	LL operator ^ (const Point b)const {return x * b.y - y * b.x;}
};
vector<Point> black, white;
int n, m;
bool _cmp(Point a, Point b)
{
	if(a.x != b.x) return a.x < b.x;
	return a.y < b.y;
}

vector<Point> get_convex_hull(vector<Point> p, int pnum)
{
	int i, limit = 1, cnt = 0;
	vector<Point> res(2 * pnum + 5);
	sort(p.begin(), p.end(), _cmp);
	for(i = 0; i < pnum; i++)
	{
		while(cnt > limit && sgn((res[cnt - 1] - res[cnt - 2]) ^ (p[i] - res[cnt - 1])) <= 0) cnt--;
		res[cnt++] = p[i];
	}
	limit = cnt;
	for(i = pnum - 2; i >= 0; i--)
	{
		while(cnt > limit && sgn((res[cnt - 1] - res[cnt - 2]) ^ (p[i] - res[cnt - 1])) <= 0) cnt--;
		res[cnt++] = p[i];
	}
	res.resize(cnt);
	return res;
}
bool onSeg(Point a, Point s, Point t)
{
	return sgn((a - s) ^ (a - t)) == 0 && sgn((a - s) * (a - t)) <= 0;
}

bool seg_seg_inter(Point a, Point b, Point s, Point t)
{
//	LL c1 = (b - a) ^ (s - a), c2 = (b - a) ^ (t - a);
//	LL c3 = (t - s) ^ (a - s), c4 = (t - s) ^ (b - s);
//	return (sgn(c1) * sgn(c2)) < 0 && (sgn(c3) * sgn(c4)) < 0;
	return
		sgn((a - t) ^ (s - t)) * sgn((b - t) ^ (s - t)) < 0 &&
		sgn((s - b) ^ (a - b)) * sgn((t - b) ^ (a - b)) < 0;
}

LL area(Point a, vector<Point> p, int pnum)
{
	LL res = 0;
	for(int i = 0; i < pnum; i++)
		res += abs((p[i + 1] - p[i]) ^ (a - p[i]));
	return abs(res);
}

bool convex_intersection()
{
	int i, j;
	if(n == 0 || m == 0 || (n == 1 && m == 1))
		return false;
	for(i = 0; i < n; i++)
		for(j = 0; j < m; j++)
		{
			if(seg_seg_inter(black[i], black[i + 1], white[j], white[j + 1])) return true;
			if(onSeg(black[i], white[j], white[j + 1])) return true;
			if(onSeg(white[j], black[i], black[i + 1])) return true;
		}
	if(n == 1)
	{
		for(i = 0; i < m; i++)
			if(onSeg(black[0], white[i], white[i + 1]))
				return true;
		return false;
	}
	if(m == 1)
	{
		for(i = 0; i < n; i++)
			if(onSeg(white[0], black[i], black[i + 1]))
				return true;
		return false;
	}
//	cout << "......\n";
	LL s = area(black[0], black, n);
	//cout << s << endl;
	if(s > 0)
	{
		for(i = 0; i < m; i++)
			if(s == area(white[i], black, n))
				return true;
	}
	s = area(white[0], white, m);
	if(s > 0)
	{
		for(i = 0; i < n; i++)
			if(s == area(black[i], white, m))
				return true;
	}
	return false;
}
int main()
{
#ifdef ACM_TEST
	freopen("in.txt", "r", stdin);
//	freopen("in.txt", "w", stdout);
#endif
	int i, j;
	int x, y;
	while(~scanf("%d%d", &n, &m) && n + m)
	{
		black.clear();
		white.clear();
		for(i = 0; i < n; i++)
		{
			scanf("%d%d", &x, &y);
			black.push_back(Point(x, y));
		}
		for(i = 0; i < m; i++)
		{
			scanf("%d%d", &x, &y);
			white.push_back(Point(x, y));
		}
		black = get_convex_hull(black, n);
		n = black.size();
		white = get_convex_hull(white, m);
		m = white.size();
		if(n > 1)n--;
		else black.push_back(black[0]);
		if(m > 1)m--;
		else white.push_back(white[0]);
//		cout << n << ' ' << m << endl;
//		for(i = 0; i < n; i++)
//			printf(" (%lld, %lld) ", black[i].x, black[i].y);
//		putchar('\n');
//		for(i = 0; i < m; i++)
//			printf(" (%lld, %lld) ", white[i].x, white[i].y);
//		putchar('\n');
		if(convex_intersection())
			printf("NO\n");
		else
			printf("YES\n");
	}
	return 0;
}

Measured memory_bytes: 1184