#include <bits/stdc++.h>
using namespace std;
class Line : public vector<complex<long long> > {
 public:
  Line(const complex<long long> &a, const complex<long long> &b) {
    push_back(a);
    push_back(b);
  }
};
namespace std {
bool operator<(const complex<long long> &a, const complex<long long> &b) {
  return real(a) != real(b) ? real(a) < real(b) : imag(a) < imag(b);
}
}  // namespace std
long long cross(const complex<long long> &a, const complex<long long> &b) {
  return imag(conj(a) * b);
}
long long dot(const complex<long long> &a, const complex<long long> &b) {
  return real(conj(a) * b);
}
int ccw(complex<long long> a, complex<long long> b, complex<long long> 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;
}
vector<complex<long long> > convex_hull(vector<complex<long long> > ps) {
  int n = ps.size();
  int k = 0;
  vector<complex<long long> > 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<long long> &p) {
  return ccw(s[0], s[1], p) == 0;
}
bool contains(const vector<complex<long long> > &P,
              const complex<long long> &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<long long>(100000, 1));
    if (intersectSS(asegment, bsegment)) {
      in = !in;
    }
    if (intersectSP(asegment, p)) {
      return true;
    }
  }
  return in;
}
bool intersectPP(const vector<complex<long long> > &a,
                 const vector<complex<long long> > &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) {
    vector<complex<long long> > white;
    vector<complex<long long> > black;
    for (int i = 0; i < n; i++) {
      int x, y;
      scanf("%d %d", &x, &y);
      white.push_back(complex<long long>(x, y));
    }
    if (n > 1) {
      white = convex_hull(white);
    }
    for (int i = 0; i < (int)white.size(); i++) {
    }
    for (int i = 0; i < m; i++) {
      int x, y;
      scanf("%d %d", &x, &y);
      black.push_back(complex<long long>(x, y));
    }
    if (m > 1) {
      black = convex_hull(black);
    }
    for (int i = 0; i < (int)black.size(); i++) {
    }
    if (!intersectPP(white, black)) {
      puts("YES");
    } else {
      puts("NO");
    }
  }
}
