#include<bits/stdc++.h>
using namespace std;

typedef long long int ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pair<int, int> > vii;
#define rrep(i, m, n) for(int (i)=(m); (i)<(n);  (i)++)
#define erep(i, m, n) for(int (i)=(m); (i)<=(n); (i)++)
#define  rep(i, n)    for(int (i)=0; (i)<(n);  (i)++)
#define rrev(i, m, n) for(int (i)=(n)-1; (i)>=(m); (i)--)
#define erev(i, m, n) for(int (i)=(n); (i)>=(m); (i)--)
#define  rev(i, n)    for(int (i)=(n)-1; (i)>=0; (i)--)
#define vrep(i, c)    for(__typeof((c).begin())i=(c).begin(); i!=(c).end(); i++)
#define  ALL(v)       (v).begin(), (v).end()
#define pb            push_back
#define mp            make_pair
template<class T, class S> inline bool minup(T& m, const S x){ return m>(T)x ? (m=(T)x, true) : false; }
template<class T, class S> inline bool maxup(T& m, const S x){ return m<(T)x ? (m=(T)x, true) : false; }

static const int    INF = 1000000000;
static const ll     MOD = 1000000007LL;
static const double EPS = 1E-9;


template<typename T> T add(T x, T y){ if(abs(x+y) < EPS*(abs(x)+abs(y))) return 0; return x + y; }
template<typename T> inline bool semieq(T x, T y){ return abs(x - y) < EPS; }
template<typename T> inline bool semige(T x, T y){ return y - x < -EPS; }
template<typename T> inline bool semile(T x, T y){ return x - y < -EPS; }


struct Point : public complex<double>
{
public:
  Point(const double x = 0.0, const double y = 0.0) { this->real(x);  this->imag(y); }
  Point(const complex<double> w)  { this->real(w.real());  this->imag(w.imag()); }
  inline double dot(Point p){ return (conj(*this) * p).real(); }  // ??????
  inline double det(Point p){ return (conj(*this) * p).imag(); }  // ??????
};

namespace std
{
  inline bool operator < (const Point& a, const Point& b)
  {
    return real(a) != real(b) ? real(a) < real(b) : imag(a) < imag(b);
  }
}
typedef vector<Point> Polygon;
inline Point currPoint(vector<Point> P, int i){ return P[i]; }
inline Point nextPoint(vector<Point> P, int i){ return P[(i+1)%P.size()]; }
inline Point diffPoint(vector<Point> P, int i){ return nextPoint(P, i) - currPoint(P, i); }

int ccw(Point a, Point b, Point c)
{
  b -= a;
  c -= a;
  if(b.det(c) > 0.0)    return  1;         // counter clockwise
  if(b.det(c) < 0.0)    return -1;         // clockwise
  if(b.dot(c) < 0.0)    return  2;         // c--a--b on line
  if(norm(b) < norm(c)) return -2;         // a--b--c on line
  return 0;
}


Polygon AndrewMonotoneChain(vector<Point> ps)
{
  int n = ps.size(), k = 0;
  if(n <= 2) return ps;
  sort(ps.begin(), ps.end());
  Polygon ch(2*n);
  for(int i=0; i<n; ch[k++]=ps[i++]) // lower-hull
    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--]) // upper-hull
    while(k >= t && ccw(ch[k-2], ch[k-1], ps[i]) <= 0) --k;
  ch.resize(k-1);
  return ch;
}

enum { OUT, ON, IN };
int convexContains(const Point p, const Polygon P)
{
  const int n = P.size();
  Point g = (P[0] + P[n/3] + P[2*n/3]) / 3.0; // inner-Point
  int a = 0, b = n;
  while (a+1 < b) { // invariant: c is in fan g-P[a]-P[b]
    int c = (a + b) / 2;
    if (semige(Point(P[a]-g).det(P[c]-g), 0.0)) { // angle < 180 deg
      if (semige(Point(P[a]-g).det(p-g), 0.0) && semile(Point(P[c]-g).det(p-g), 0.0)) b = c;
      else a = c;
    } else {
      if (semile(Point(P[a]-g).det(p-g), 0.0) && semige(Point(P[c]-g).det(p-g), 0.0)) a = c;
      else b = c;
    }
  }
  b %= n;
  if (semile(Point(P[a] - p).det(P[b] - p), 0.0)) return 0;
  if (semige(Point(P[a] - p).det(P[b] - p), 0.0)) return 2;
  return 1;
}


bool intersect_1pt(const Point a, const Point b,
                   const Point c, const Point d, Point& r)
{
  double D =  Point(b - a).det(d - c);
  if (semieq(D, 0.0)) return false;
  double t =  Point(c - a).det(d - c) / D;
  double s = -Point(a - c).det(b - a) / D;
  r = a + t * (b - a);
  return !semile(t, 0.0) && !semige(t, 1.0) && !semile(s, 0.0) && !semige(s, 1.0);
}

Polygon convexIntersect(const Polygon P, const Polygon Q)
{
  const int n = P.size(), m = Q.size();
  int a = 0, b = 0, aa = 0, ba = 0;
  enum { Pin, Qin, Unknown } in = Unknown;
  Polygon R;
  do {
    int a1 = (a+n-1) % n, b1 = (b+m-1) % m;
    double C = Point(P[a] - P[a1]).det(Q[b] - Q[b1]);
    double A = Point(P[a1] - Q[b]).det(P[a] - Q[b]);
    double B = Point(Q[b1] - P[a]).det(Q[b] - P[a]);
    Point r;
    if (intersect_1pt(P[a1], P[a], Q[b1], Q[b], r)) {
      if (in == Unknown) aa = ba = 0;
      R.push_back( r );
      in = B > 0 ? Pin : A > 0 ? Qin : in;
    }
    if (C == 0 && B == 0 && A == 0) {
      if (in == Pin) { b = (b + 1) % m; ++ba; }
      else           { a = (a + 1) % m; ++aa; }
    } else if (C >= 0) {
      if (A > 0) { if (in == Pin) R.push_back(P[a]); a = (a+1)%n; ++aa; }
      else       { if (in == Qin) R.push_back(Q[b]); b = (b+1)%m; ++ba; }
    } else {
      if (B > 0) { if (in == Qin) R.push_back(Q[b]); b = (b+1)%m; ++ba; }
      else       { if (in == Pin) R.push_back(P[a]); a = (a+1)%n; ++aa; }
    }
  } while ( (aa < n || ba < m) && aa < 2*n && ba < 2*m );
  if (in == Unknown) {
    if (convexContains(P[0], Q)) return P;
    if (convexContains(Q[0], P)) return Q;
  }
  return R;
}

struct Line : public vector<Point>
{
public:
  Line(){ }
  Line(const Point P, const Point Q){ this->pb(P);  this->pb(Q); }
  Line(double px, double py, double qx, double qy){ this->pb(Point(px, py));  this->pb(Point(qx, qy)); }
};
typedef Line Segment;


inline bool intersectionDeterminationOfSS(Segment S, Segment 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;}
inline bool onSegment(Point P, Segment S){return semieq(Point(S[0]-P).det(S[1]-P),0.0)&&!semige(Point(S[0]-P).dot(S[1]-P),0.0);}



int n, m;
double x, y;

int main(int argc, char *argv[])
{
  while(cin >> n >> m, n + m){
    vector<Point> B(n);
    vector<Point> W(m);
    rep(i, n){
      cin >> x >> y;
      B[i] = Point(x, y);
    }
    rep(i, m){
      cin >> x >> y;
      W[i] = Point(x, y);
    }

    B = AndrewMonotoneChain(B);
    W = AndrewMonotoneChain(W);
    int b = B.size();
    int w = W.size();
    if(b > w){
      swap(B, W);
      swap(b, w);
    }
    if(b == 1 && w == 1){
      puts("YES");
      continue;
    }
    if(b == 1){
      bool ok;
      if(w == 2) ok = onSegment(B[0], Segment(W[0], W[1]));
      else ok = convexContains(B[0], W);
      puts(ok ? "NO" : "YES");
      continue;
    }
    if(b == 2){
      bool ok = false;
      if(w == 2) ok = intersectionDeterminationOfSS(Segment(B[0], B[1]), Segment(W[0], W[1]));
      else{
        ok = convexContains(B[0], W) || convexContains(B[1], W);
      }
      puts(ok ? "NO" : "YES");
      continue;
    }
    puts(convexIntersect(B, W).size() ? "NO" : "YES");
  }
  
  return 0;
}

Measured memory_bytes: 1228