#include <cstdio>
#include <vector>
#include <algorithm>

typedef long long ll;

// long long
struct P{
    P(){}
    P(ll _r, ll _i):r(_r), i(_i){}
    void real(const ll& v){r = v;}
    void imag(const ll& v){i = v;}
    ll r, i;
};

ll real(const P& p){return p.r;}
ll imag(const P& p){return p.i;}
ll norm(const P& p){ll r = real(p), i = imag(p); return r * r + i * i;}

P operator+(const P& lhs, const P& rhs){
    return P(real(lhs)+real(rhs), imag(lhs)+imag(rhs));
}
P operator-(const P& lhs, const P& rhs){
    return P(real(lhs)-real(rhs), imag(lhs)-imag(rhs));
}
P operator-(const P& p){
    return P(-real(p), -imag(p));
}
bool operator>(const P& lhs, const P& rhs){
    if(imag(lhs) - imag(rhs)){return imag(lhs) > imag(rhs);}
    return real(lhs) > real(rhs);
}
bool operator<(const P& lhs, const P& rhs){
    if(imag(lhs) - imag(rhs)){return imag(lhs) < imag(rhs);}
    return real(lhs) < real(rhs);    
}

ll cross(const P& lhs, const P& rhs){
    return real(lhs)*imag(rhs) - imag(lhs)*real(rhs);
}

ll dot(const P& lhs, const P& rhs){
    return real(lhs)*real(rhs) + imag(lhs)*imag(rhs);
}

int ccw(P a, P b, P c){
    b = b - a; c = c - a;
    if(cross(b, c) > 0)return 1; // counter clock wise
    if(cross(b, c) < 0)return -1; // clock wise
    if(dot(b, c) < 0)return 2; // B A C
    if(norm(b) < norm(c))return -2; // A B C
    return 0; // A C B
}

// Convex-Hull
std::vector<P> convex_hull(std::vector<P>& ps){
    int n = ps.size(), k = 0;
    std::sort(ps.begin(), ps.end());
    
    std::vector<P> ch(2*n);
    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 isIn(const P& p, const std::vector<P>& polygon){
    bool in = false;
    int V = polygon.size();
    for(int i=0;i<V;i++){
        P p1 = polygon[i] - p, p2 = polygon[(i+1)%V] - p;
        if(imag(p1) > imag(p2)){std::swap(p1, p2);}
        if(imag(p1) <= 0 && 0 < imag(p2) && cross(p1, p2) > 0){
            in = !in;
        }
        if(cross(p1, p2) == 0 && dot(p1, p2) <= 0){
            return true;
        }
    }
    return in;
}

bool areIntersectedLines(const P& p1, const P& p2, const P& q1, const P& q2){
    if(cross(p1-p2, q1-p2) == 0 && dot(p1-p2, q1-p2) > 0 &&
       0 <= norm(q1-p2) && norm(q1-p2) <= norm(p1-p2)){
        return true;
    }
    if(cross(p1-p2, q2-p2) == 0 && dot(p1-p2, q2-p2) > 0 &&
       0 <= norm(q2-p2) && norm(q2-p2) <= norm(p1-p2)){
        return true;
    }
    if(cross(q1-q2, p1-q2) == 0 && dot(q1-q2, p1-q2) > 0 &&
       0 <= norm(p1-q2) && norm(p1-q2) <= norm(q1-q2)){
        return true;
    }
    if(cross(q1-q2, p2-q2) == 0 && dot(q1-q2, p2-q2) > 0 &&
       0 <= norm(p2-q2) && norm(p2-q2) <= norm(q1-q2)){
        return true;
    }

    return (cross(p1-p2, q1-p2) * cross(p1-p2, q2-p2) < 0) &&
        (cross(q1-q2, p1-q2) * cross(q1-q2, p2-q2) < 0);
}

int N, M;
std::vector<P> bs, ws;

int main(){
    while(scanf("%d %d", &N, &M), N || M){
        bs.resize(N);
        ws.resize(M);
        
        for(int i=0;i<N;i++){
            ll x, y;
            scanf("%lld %lld", &x, &y);

            bs[i].real(x);
            bs[i].imag(y);
        }
        for(int i=0;i<M;i++){
            ll x, y;
            scanf("%lld %lld", &x, &y);

            ws[i].real(x);
            ws[i].imag(y);        
        }

        if(N == 1 && M == 1){
            puts("YES");
            continue;
        }

        if(N < M){std::swap(bs, ws); std::swap(N, M);}

        if(N == 2){
            if(M == 1){
                puts(ccw(bs[0], bs[1], ws[0]) ? "YES" : "NO");
                continue;
            }else{
                puts(!areIntersectedLines(bs[0], bs[1], ws[0], ws[1]) ? "YES" : "NO");
                continue;
            }
        }
        
        std::vector<P> ch = convex_hull(bs);

        bool res = true;
        for(int i=0;i<M;i++){
            if(isIn(ws[i], ch)){res = false; break;}
        }

        if(M >= 3){
            ch = convex_hull(ws);

            for(int i=0;i<N;i++){
                if(isIn(bs[i], ch)){res = false; break;}
            }
        }

        puts(res ? "YES" : "NO");
    }
}

Measured memory_bytes: 1012