// ------ Petr Mitrichev is Professional. ------ //

#include <cmath>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;

// ------ Class ------ //
class Point {
public:
	long double px, py;
	Point() : px(0), py(0) {};
	Point(long double px_, long double py_) : px(px_), py(py_) {};
	bool operator==(const Point& p) const { return px == p.px && py == p.py; }
	bool operator!=(const Point& p) const { return px != p.px || py != p.py; }
	bool operator<(const Point& p) const { return px < p.px ? true : (px == p.px && py < p.py); }
	bool operator>(const Point& p) const { return px > p.px ? true : (px == p.px && py > p.py); }
	bool operator<=(const Point& p) const { return !(Point(px, py) > p); }
	bool operator>=(const Point& p) const { return !(Point(px, py) < p); }
	Point operator+(const Point& p) const { return Point(px + p.px, py + p.py); }
	Point operator-(const Point& p) const { return Point(px - p.px, py - p.py); }
	Point operator/(long double d) const { return Point(px / d, py / d); }
	friend Point operator*(const Point p, long double d) { return Point(p.px * d, p.py * d); }
	friend Point operator*(long double d, const Point& p) { return p * d; }
	Point& operator+=(const Point& p1) { px += p1.px, py += p1.py; return *this; }
	Point& operator-=(const Point& p1) { px -= p1.px, py -= p1.py; return *this; }
	Point& operator*=(long double d) { px *= d, py *= d; return *this; }
	Point& operator/=(long double d) { px /= d, py /= d; return *this; }
};

// ------ Functions ------ //
long double norm(const Point& a) { return a.px * a.px + a.py * a.py; }
long double abs(const Point& a) { return sqrtl(norm(a)); }
long double arg(const Point& a) { return atan2l(a.py, a.px); }
long double dot(const Point& a, const Point& b) { return a.px * b.px + a.py * b.py; }
long double crs(const Point& a, const Point& b) { return a.px * b.py - a.py * b.px; }
Point pol(long double r, long double d) { return Point(cosl(d) * r, sinl(d) * r); }
int ccw(const Point& p0, const Point& p1, const Point& p2) {
	Point a = p1 - p0, b = p2 - p0;
	if (crs(a, b) > 1e-10) return 1;
	if (crs(a, b) < -1e-10) return -1;
	if (dot(a, b) < -1e-10) return 2;
	if (norm(a) < norm(b)) return -2;
	return 0;
}
vector<Point> convex_hull(vector<Point> v) {
	if (v.size() < 3) return v;
	sort(v.begin(), v.end());
	vector<Point> u = { v[0], v[1] }, l = { v[v.size() - 1], v[v.size() - 2] };
	for (int i = 2; i < v.size(); i++) {
		for (int n = u.size(); n >= 2 && ccw(u[n - 2], u[n - 1], v[i]) >= 0; n--) u.pop_back();
		u.push_back(v[i]);
	}
	for (int i = v.size() - 3; i >= 0; i--) {
		for (int n = l.size(); n >= 2 && ccw(l[n - 2], l[n - 1], v[i]) >= 0; n--) l.pop_back();
		l.push_back(v[i]);
	}
	reverse(l.begin(), l.end());
	for (int i = u.size() - 2; i >= 1; i--) l.push_back(u[i]);
	return l;
}

// ------ Main ------ //
int n, m; vector<Point> v1, v2, v3, v4;
bool ok(int i) {
	int u = (i + 1) % v3.size();
	for (int j = 0; j < v4.size(); j++) {
		if (abs(ccw(v3[i], v3[u], v4[j])) != 1) return false;
	}
	for (int j = 0; j < v3.size(); j++) {
		if (i == j || u == j) continue;
		for (int k = 0; k < v4.size(); k++) {
			if (ccw(v3[i], v3[u], v3[j]) == ccw(v3[i], v3[u], v4[k])) return false;
		}
	}
	for (int j = 0; j < v4.size(); j++) {
		for (int k = j + 1; k < v4.size(); k++) {
			if (ccw(v3[i], v3[u], v4[j]) != ccw(v3[i], v3[u], v4[k])) return false;
		}
	}
	return true;
}
int main() {
	while (cin >> n >> m, n + m) {
		v1.resize(n), v2.resize(m);
		for (int i = 0; i < n; i++) cin >> v1[i].px >> v1[i].py;
		for (int i = 0; i < m; i++) cin >> v2[i].px >> v2[i].py;
		v3 = convex_hull(v1), v4 = convex_hull(v2);
		int x = 0;
		if (v3.size() == 1 && v4.size() == 1) x = 1;
		if (!x && v3.size() > 1) {
			int w = ccw(v3[0], v3[1], v4[0]);
			if (abs(w) == 2) {
				int f = 1;
				for (int i = 1; i < v4.size(); i++) {
					if (ccw(v3[0], v3[1], v4[i]) != w) {
						f = 0; break;
					}
				}
				if (f) x = 1;
			}
		}
		if (!x && v4.size() > 1) {
			int w = ccw(v4[0], v4[1], v3[0]);
			if (abs(w) == 2) {
				int f = 1;
				for (int i = 1; i < v3.size(); i++) {
					if (ccw(v4[0], v4[1], v3[i]) != w) {
						f = 0; break;
					}
				}
				if (f) x = 1;
			}
		}
		if (!x) {
			for (int i = 0; i < v3.size(); i++) {
				if (ok(i)) x = 1;
			}
		}
		if (!x) {
			swap(v3, v4);
			for (int i = 0; i < v4.size(); i++) {
				if (ok(i)) x = 1;
			}
		}
		cout << (x ? "YES" : "NO") << endl;
	}
}

Measured memory_bytes: 3144