#include <iostream>
#include <stdio.h>
#include <algorithm>
#include <stdio.h>
#include <math.h>
#include <complex>
#include <vector>

using namespace std;
typedef complex<long long> Complex;
typedef vector<Complex> Polygon;
class Line : public vector<Complex> {
public:
  Line(const Complex &a, const Complex &b) {
    push_back(a); push_back(b);
  }
};

namespace std {
  bool operator<(const Complex &a, const Complex &b) {
    return real(a) != real(b) ? real(a) < real(b) : imag(a) < imag(b);
  }
}


long long cross(const Complex &a, const Complex &b) {
  return imag(conj(a) * b);
}

long long dot(const Complex &a, const Complex &b) {
  return real(conj(a) * b);
}

int ccw(Complex a, Complex b, Complex 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;
}

Polygon convex_hull(Polygon ps) {
  int n = ps.size();
  int k = 0;
  Polygon ch(2 * n);
  sort(ps.begin(), ps.end());
  for (int i = 0; i < n; ch[k++] = ps[i++]) {
    while (k >= 2 && ccw(ch[k - 2], ch[k - 1], ps[i]) <= 0) { k--; }
  }
  for (int i = n - 2, t = k + 1; i >= 0; ch[k++] = ps[i--]) {
    while (k >= t && ccw(ch[k - 2], ch[k - 1], ps[i]) <= 0) { k--; }
  }
  ch.resize(k - 1);
  return ch;
}

bool intersectSS(const Line &s, const Line &t) {
  return ccw(s[0], s[1], t[0]) * ccw(s[0], s[1], t[1]) <= 0 &&
    ccw(t[0], t[1], s[0]) * ccw(t[0], t[1], s[1]) <= 0;
}

bool intersectSP(const Line &s, const Complex &p) {
  return ccw(s[0], s[1], p) == 0;
}

bool contains(const Polygon &P, const Complex &p) {
  bool in = false;
  for (int i = 0; i < (int)P.size(); i++) {
    int next = (i + 1) % (int)P.size();
    Line asegment(P[i], P[next]);
    Line bsegment(p, p + Complex(100000, 1));
    if (intersectSS(asegment, bsegment)) { in = !in; }
    if (intersectSP(asegment, p)) { return true; }
  }
  return in;
}

bool intersectPP(const Polygon &a, const Polygon &b) {
  if (a.size() <= 1 && b.size() <= 1) {
    return a[0].real() == b[0].real() && a[0].imag() == b[0].imag();
  }
  if (a.size() != 1 || b.size() != 1) {
    for (int i = 0; i < (int)a.size(); i++) {
      int next = (i + 1) % (int)a.size();
      Line asegment(a[i], a[next]);
      for (int j = 0; j < (int)b.size(); j++) {
        int next = (j + 1) % (int)b.size();
        Line bsegment(b[j], b[next]);
        if (intersectSS(asegment, bsegment)) { return true; }
      }
    }
  }
  if (b.size() != 1) {
    if (contains(b, a[0])) { return true; }
  }
  if (a.size() != 1) {
    if (contains(a, b[0])) { return true; }
  }
  return false;
}

int main() {
  int n, m;
  while (scanf("%d %d", &n, &m), n|m) {
    Polygon white;
    Polygon black;
    for (int i = 0; i < n; i++) {
      int x, y;
      scanf("%d %d", &x, &y);
      white.push_back(Complex(x, y));
    }
    if (n > 1) {
      white = convex_hull(white);
    }
    for (int i = 0; i < (int)white.size(); i++) {
      //cout << white[i] << endl;
    }
    //cout << endl;
    for (int i = 0; i < m; i++) {
      int x, y;
      scanf("%d %d", &x, &y);
      black.push_back(Complex(x, y));
    }
    if (m > 1) {
      black = convex_hull(black);
    }
    for (int i = 0; i < (int)black.size(); i++) {
      //cout << black[i] << endl;
    }
    if (!intersectPP(white, black)) {
      puts("YES");
    } else {
      puts("NO");
    }
  }
}

Measured memory_bytes: 900