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

using namespace std;

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

#define X real()
#define Y imag()

typedef complex<double> P;
typedef pair<P, P> L;
typedef vector<P> Pol;

const double INF = 1e40;
const double EPS = 1e-8;
const double PI = acos(-1);

int sig(double r) {return (r < -EPS) ? -1 : (r > EPS) ? 1: 0;}
bool eq(double a, double b) {return abs(a - b) < EPS;}
bool near(P a, P b) {return abs(b - a) < EPS;}
double dot(P a, P b) {return a.X * b.X + a.Y * b.Y;}
double cross(P a, P b) {return a.X * b.Y - a.Y * b.X;}
P vec(L a) {return a.second - a.first;}
enum CCW{FRONT = 1, RIGHT = 2, BACK = 4, LEFT = 8, ON = 16};
int ccw(L s, P p) {
  P a = vec(s);
  p -= s.first;
  double cr = cross(a, p);
  if (eq(cr, 0)) {
    if (sig(dot(a, p)) < 0) return BACK;
    if (sig(norm(a) - norm(p)) < 0) return FRONT;
    return ON;
  }
  return (cr > 0) ? LEFT : RIGHT;
}
bool iSS(L a, L b) {
  int cwa = ccw(a, b.first) | ccw(a, b.second);
  int cwb = ccw(b, a.first) | ccw(b, a.second);
  if ((cwa | cwb) & ON) return true;
  return (cwa & cwb) == (LEFT | RIGHT);
}
bool iLSs(L a, L b) {return sig(cross(vec(a), b.first - a.first)) * sig(cross(vec(a), b.second - a.first)) < 0;}
P pLL(L a, L b) {return a.first + vec(a) * (cross(vec(b), b.first - a.first) / cross(vec(b), vec(a)));}
bool lessX(P a, P b){
  if(!eq(a.X, b.X)) return a.X < b.X;
  if(!eq(a.Y, b.Y)) return a.Y < b.Y;
  return false;
}
int sGP(Pol pol, P p) {
  int side = -1;
  rep (i, pol.size()) {
    P p0 = pol[i] - p, p1 = pol[(i + 1) % pol.size()] - p;
    if (sig(cross(p0, p1)) == 0 && sig(dot(p0, p1)) <= 0) return 0;
    if (p0.Y > p1.Y) swap(p0, p1);
    if (sig(p0.Y) <= 0 && 0 < sig(p1.Y) && sig(cross(p0, p1)) > 0) side *= -1;
  }
  return side;
}
int sVP(Pol pol, P p) {
  int bit = 0;
  rep (i, pol.size()) {
    bit |= ccw(L(pol[i], pol[(i + 1) % pol.size()]), p);
    if (bit & ON) return 0;
  }
  if (__builtin_popcount(bit) == 1) return 1;
  return -1;
}
vector<P> convexHull(vector<P> p) {
  int m = 0;
  vector<P> q(p.size() * 2);
  sort(p.begin(), p.end(), lessX);
  for (int i = 0; i < int(p.size()); q[m++] = p[i++]) for (; m > 1 && sig(cross(q[m - 1] - q[m - 2], p[i] - q[m - 2])) <= 0; --m);
  for (int i = p.size() - 2, r = m; i >= 0; q[m++] = p[i--]) for (; m > r && sig(cross(q[m - 1] - q[m - 2], p[i] - q[m - 2])) <= 0; --m);
  q.resize(m - 1);
  return q;
}

int main() {
  int n, m;
  for (;;) {
    cin >> n >> m;
    if (n == 0 && m == 0) break;
    Pol white, black;
    rep (i, n) {
      P p;
      cin >> p.X >> p.Y;
      white.push_back(p);
    }
    rep (i, m) {
      P p;
      cin >> p.X >> p.Y;
      black.push_back(p);
    }
    Pol wc = convexHull(white);
    Pol bc = convexHull(black);
    if (wc.size() == 0u) wc = white;
    if (bc.size() == 0u) bc = black;
    if (bc.size() >= 2u) {
      rep (i, wc.size()) {
	if (sVP(bc, wc[i]) >= 0) goto aaa;
      }
    }
    if (wc.size() >= 2u) {
      rep (i, bc.size()) {
	if (sVP(wc, bc[i]) >= 0) goto aaa;
      }
    }
    if (wc.size() >= 2u && bc.size() >= 2u) {
      rep (i, wc.size()) rep (j, bc.size()) {
	if (iSS(L(wc[i], wc[(i + 1) % wc.size()]), L(bc[j], bc[(j + 1) % bc.size()]))) goto aaa;
      }
    } else if (wc.size() == 1u && bc.size() == 1u) {
      if (near(wc[0], bc[0])) goto aaa;
    }
    cout << "YES" << endl;
    continue;
  aaa:;
    cout << "NO" << endl;
  }
  return 0;
}

Measured memory_bytes: 984