#include <iostream>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <vector>
#include <algorithm>
#include <functional>
#include <stack>
#include <queue>
#include <deque>
#include <string>
#include <sstream>
#include <map>
#include <set>
#include <cassert>

#define ATHFILE(f) freopen(f ".in", "r", stdin), freopen(f ".my", "w", stdout)
#define DEBUGT(t) if (_t == t) _asm int 3
typedef long long LL;
typedef long double LD;
inline int RD() { int x; scanf("%d", &x); return x; }
inline char RDA() { char ch; while ((ch = getchar()) && !isalpha(ch)); return ch; }
#define Rush for (int tests = RD(), _t = 1; _t <= tests; ++_t)
#define ZMV(x, v) memset((x), (v), sizeof(x))
#define ZM(x) memset((x), 0, sizeof(x))
#define SZ(v) (int)(v.size())
#define ALL(v) v.begin(), v.end()
const int maxint = 0x7f7f7f7f;
const int mod = 1000000007;
const double eps = 1e-8, pi = acos(-1.0);

using namespace std;

struct point_t {
	double x, y;
	point_t() { }
	point_t(double tx, double ty) : x(tx), y(ty) { }
	point_t operator-(const point_t &r) const { return point_t(x - r.x, y - r.y); }
	point_t operator+(const point_t &r) const { return point_t(x + r.x, y + r.y); }
	point_t operator*(const double r) const { return point_t(x * r, y * r); }
	point_t operator/(const double r) const { return point_t(x / r, y / r); }
	point_t rot90() const { return point_t(-y, x); }
	double l() const { return sqrt(x * x + y * y); }
	void read() { scanf("%lf%lf", &x, &y); }
};

int dblcmp(double x) {
	return (x < -eps ? -1 : x > eps);
}

double dist(point_t p1, point_t p2) {
	return sqrt((p1.x - p2.x) * (p1.x - p2.x) + (p1.y - p2.y) * (p1.y - p2.y));
}

double cross(point_t p1, point_t p2) {
	return p1.x * p2.y - p2.x * p1.y;
}

double dot(point_t p1, point_t p2) {
	return p1.x * p2.x + p1.y * p2.y;
}

bool cmp(const point_t p1, const point_t p2) {
	return dblcmp(p1.y - p2.y) == 0 ? p1.x < p2.x : p1.y < p2.y;
}

bool onseg(point_t p, point_t s1, point_t s2) {
	if (dblcmp(cross(p - s1, p - s2)) != 0) return false;
	return dblcmp(dot(s1 - p, s2 - p)) <= 0;
}

const int maxn = 101;
int graham(point_t *p, int n) {
	if (n <= 2) return n;
	sort(p + 1, p + 1 + n, cmp);
	int top; static point_t sk[maxn];
	top = 2, sk[1] = p[1], sk[2] = p[2];
	for (int i = 3; i <= n; ++i) {
		while (top >= 2 && dblcmp(cross(p[i] - sk[top - 1], sk[top] - sk[top - 1])) >= 0) --top;
		sk[++top] = p[i];
	}
	int ttop = top;
	for (int i = n - 1; i >= 1; --i) {
		while (top > ttop && dblcmp(cross(p[i] - sk[top - 1], sk[top] - sk[top - 1])) >= 0) --top;
		sk[++top] = p[i];
	}
	--top;
	for (int i = 1; i <= top; ++i) p[i] = sk[i];
	return top;
}

int n, m;
point_t a[maxn], b[maxn];

bool inside(point_t p, point_t *convex, int n) {
	bool hasN = false, hasP = false;
	convex[0] = convex[n];
	for (int i = 1; i <= n; ++i) {
		int sgn = dblcmp(cross(p - convex[i - 1], convex[i] - convex[i - 1]));
		if (sgn == 1) hasP = true;
		else if (sgn == -1) hasN = true;
		else {
			if (onseg(p, convex[i - 1], convex[i])) return true;
		}
	}
	if (hasN && hasP) return false;
	if (!hasN && !hasP) return false;
	return true;
}

int testSS(point_t a, point_t b, point_t c, point_t d) {
	if (dblcmp(max(a.x, b.x) - min(c.x, d.x)) < 0) return 0;
	if (dblcmp(max(c.x, d.x) - min(a.x, b.x)) < 0) return 0;
	if (dblcmp(max(a.y, b.y) - min(c.y, d.y)) < 0) return 0;
	if (dblcmp(max(c.y, d.y) - min(a.y, b.y)) < 0) return 0;
	int d1 = dblcmp(cross(c - a, b - a));
	int d2 = dblcmp(cross(d - a, b - a));
	int d3 = dblcmp(cross(a - c, d - c));
	int d4 = dblcmp(cross(b - c, d - c));
	if ((d1 * d2 < 0) && (d3 * d4 < 0)) return 1;
	if ((d1 * d2 <= 0 && d3 * d4 == 0) || (d1 * d2 == 0 && d3 * d4 <= 0)) return -1;
	return 0;
}

int main() {
	while (scanf("%d%d", &n, &m) != EOF) {
		if (n + m == 0) break;
		for (int i = 1; i <= n; ++i) a[i].read();
		for (int i = 1; i <= m; ++i) b[i].read();
		n = graham(a, n);
		m = graham(b, m);
		bool ok = true;
		for (int i = 1; i <= n; ++i) {
			if (inside(a[i], b, m)) ok = false;
		}
		for (int i = 1; i <= m; ++i) {
			if (inside(b[i], a, n)) ok = false;
		}
		a[0] = a[n]; b[0] = b[m];
		for (int i = 0; i < n; ++i) {
			for (int j = 0; j < m; ++j) {
				if (testSS(a[i], a[i + 1], b[j], b[j + 1]) != 0) ok = false;
			}
		}
		puts(ok ? "YES" : "NO");
	}

	return 0;
}

Measured memory_bytes: 1208