#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cmath>
#include<map>
#include<vector>
#include<queue>
#include<functional>
#include<cstring>
#include<cstdlib>
#include<complex>
using namespace std;
typedef long long ll;
typedef complex < double > Point;

typedef vector < Point > Polygon;
namespace std {
    bool operator < (Point a,Point b) {
        return real(a) != real(b) ? real(a) < real(b) : imag(a) < imag(b);
    }
}
const double EPS = 1e-8;
const double INF = 1e12;



struct Line : Polygon{
    Line(){};
    Line(Point p,Point q){ push_back(p);push_back(q); }
};
struct Circle{
    Point p;
    double r;
    Circle(){};
    Circle(Point a, double s){ p = a;r = s; }
};

// ベクタの長さ
double VectorLength(Point a){
    return abs(a);
}

// 二点間距離
double DistancePP(Point a,Point b){
    return abs(a-b);
}

// 単位ベクトル
Point UnitVector(Point a){
    return a / abs(a);
}

// 法線ベクトル
pair<Point,Point> NormalVector(Point a){
    Point n1 = a * Point(0,1);
    Point n2 = a * Point(0,-1);
    return make_pair(n1,n2);
}

//外積
double cross(Point p,Point q){
    return imag(conj(p)*q);
}

//内積
double dot(Point p,Point q){
    return real(conj(p)*q);
}

int ccw(Point a,Point b,Point 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; //直線上に c - a - b
    if(norm(b)<norm(c))return -2; // 直線上に a - b - c
    return 0; // 直線上に a - c - b
}

Point normalize(Point P, double l){
    double a = real(P), b = imag(P);
    double y = sqrt(b*b/(a*a+b*b)*l*l);
    double x = (a/b)*y;

    return Point(x,y);
}

//三角形の面積
double TriangleArea(Point A, Point B, Point C){
    return abs(cross(B-A,C-A)/2);
}

//多角形の面積
double VertexArea(Polygon v){
    double ret = 0;
    for(int i=1;i<v.size()-1;i++){
        ret += TriangleArea(v[0],v[i],v[i+1]);
    }
    return abs(ret);
}

bool intersectLL(Line l, Line m) {
    return abs(cross(l[1]-l[0], m[1]-m[0])) > EPS || // 平行でない
         abs(cross(l[1]-l[0], m[0]-l[0])) < EPS;   // 同一の線
}
bool intersectLS(Line l, Line s) {
    return cross(l[1]-l[0], s[0]-l[0])*       // s[0] が lの左
           cross(l[1]-l[0], s[1]-l[0]) < EPS; // s[1] が lの右
}
bool intersectLP(Line l, Point p) {
    return abs(cross(l[1]-p, l[0]-p)) < EPS;
}
bool intersectSS(Line s, 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(Line s, Point p) {
    return abs(s[0]-p)+abs(s[1]-p)-abs(s[1]-s[0]) < EPS; // triangle inequality
}
double distanceLP(Line l, Point p);
bool intersectCS(Circle C,Line l){
    return (distanceLP(l,C.p) < C.r + EPS and
             (C.r < abs(C.p-l[0]) + EPS or C.r < abs(C.p-l[1]) + EPS));
}
//↓2円の交点二つを返す（ポインタ）,戻り値は交点の個数
int intersectCC(Circle A, Circle B, Point *p, Point *q){

    Point P,Q;
    if(B.p < A.p)swap(A.p,B.p);
    Point dv = B.p - A.p;//ベクトル


    double L = sqrt(norm(dv));
    int num;
    //距離がLの場合
    if( L==(A.r + B.r) ){
        num = 1;
        //交点1つ
        //虚数軸に沿って並んでいるとバグる？
        dv = normalize(dv,A.r);
        P = Q = Point(real(dv)+real(A.p),imag(dv)+imag(A.p));
    }
    else if( L<(A.r + B.r) && L > fabs(A.r - B.r) ){
        num = 2;
        //交点2つ
        /*
        交点の一方Qからベクトルdvに垂線を下ろしたところをptとする
        ふたつの直角三角形p0-pt-Q、p1-pt-Qができる
        p0-pt間の長さをtとすると、これらの三角形のQ-ptの長さは等しいため、

        r0*r0 - t*t = r1*r1 - (L-t)*(L-t)
        r0*r0 - t*t = r1*r1 - L*L - t*t + 2*L*t
        t = (r0*r0 - r1*r1 + L*L)/(2*L)

        tから、p0-Qベクトルとdvベクトルとの角度aを求め、
        dvベクトルから、+a,-aの座標を求めれば交点となる
        */

        //tを求める
        double t = 0.5*( A.r*A.r - B.r*B.r + L*L)/L;

        //p0-Qベクトルとdvベクトルの角度
        double a = acos( t/A.r );

        //dvベクトルの角度
        double a0 = atan2( imag(dv), real(dv) );

        //交点
        P = Point( real(A.p) + A.r*cos(a0+a), imag(A.p) + A.r*sin(a0+a) );
        Q = Point( real(A.p) + A.r*cos(a0-a), imag(A.p) + A.r*sin(a0-a) );

    }
    else{
        num = 0;
        //交点なし
    }

    *p = P;
    *q = Q;

    return num;
}
/*
// 直線と点の最短距離を実現する直線の点(垂線の足)(未検証)
point nearest_point_line_and_point(point a1,point a2,point b){
    return a1 + (a2-a1) * dot((a2-a1),(b-a1)) / norm(a2-a1);
}

// 線分と点の最短距離を実現する線分嬢の点(未検証）
point nearest_point_linesegment_and_point(point a1,point a2,point b){
    if(dot(a2-a1,b-a1) < EPS) return a1;
    if(dot(a1-a2,b-a2) < EPS) return a2;
    return nearest_point_line_and_point(a1,a2,b);
}
*/
Point projection(Line l, Point p) {//射影
    double t = dot(p-l[0], l[0]-l[1]) / norm(l[0]-l[1]);
    return l[0] + t * (l[0]-l[1]);
}
Point reflection(Line l, Point p) {//反射
    return p + (projection(l, p) - p) + (projection(l, p) - p);
}
double distanceLP(Line l, Point p) {
    return abs(p - projection(l, p));
}
double distanceLL(Line l, Line m) {
    return intersectLL(l, m) ? 0 : distanceLP(l, m[0]);
}
double distanceLS(Line l, Line s) {
    if (intersectLS(l, s)) return 0;
    return min(distanceLP(l, s[0]), distanceLP(l, s[1]));
}
double distanceSP(Line s, Point p) {
    const Point r = projection(s, p);
    if (intersectSP(s, r)) return abs(r - p);
    return min(abs(s[0] - p), abs(s[1] - p));
}
double distanceSS(Line s, Line t) {
    if (intersectSS(s, t)) return 0;
    return min(min(distanceSP(s, t[0]), distanceSP(s, t[1])),
             min(distanceSP(t, s[0]), distanceSP(t, s[1])));
}
Point crosspoint(Line l, Line m) {
    double A = cross(l[1] - l[0], m[1] - m[0]);
    double B = cross(l[1] - l[0], l[1] - m[0]);
    if (abs(A) < EPS && abs(B) < EPS) return m[0]; // same line
    if (abs(A) < EPS);
    return m[0] + B / A * (m[1] - m[0]);
}
/*
double area(Polygon P) {//多角形の面積
    double A = 0;
    for (int i = 0; i < P.size(); ++i)
        A += cross(curr(P, i), next(P, i));
    return A;
}
*/
Polygon ConvexHull(Polygon ps) {//凸包
    int n = ps.size(), k = 0;
    if(n == 1)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;
}

// Point - Vertex
enum{OUT, ON, IN};
int IsInnerPointVertex(Polygon ps,Point a){
    bool flg = false;
    for(int i = 0;i < ps.size();i++){
        Point p = ps[i] - a,q = ps[(i+1)%ps.size()] - a;
        if(imag(p)>imag(q))swap(p,q);
        if(imag(p)<=0&&0<imag(q)){
            if(cross(p,q) < 0)flg = !flg;
        }
        if(cross(p,q) == 0 && dot(p,q) <= 0)return ON;
    }
    return flg ? IN : OUT;
}
int main(){
    int n,m;
    while(cin>>n>>m,n){
        Polygon G,H;
        for(int i = 0;i < n;i++){
            double x,y;
            cin>>x>>y;
            G.push_back(Point(x,y));
        }
        for(int i = 0;i < m;i++){
            double x,y;
            cin>>x>>y;
            H.push_back(Point(x,y));
        }
        G = ConvexHull(G);
        H = ConvexHull(H);
        int g = G.size(),h = H.size();
        //cout<<g<<" "<<h<<endl;
        if(g > h)swap(G,H);
        g = G.size(),h = H.size();
        bool flg = true;
        for(int i = 0;i < g;i++){
            if(IsInnerPointVertex(H,G[i]) != OUT){
                flg = false;
                break;
            }
        }
        for(int i = 0;i < h;i++){
            if(IsInnerPointVertex(G,H[i]) != OUT){
                flg = false;
                break;
            }
        }

        if(h == 1)flg = true;
        else if(g == 1 && h == 2){
            flg = !(intersectSP(Line(H[0],H[1]),G[0]));
        }
        else if(g == 2 && h == 2){
            flg = !(intersectSS(Line(G[0],G[1]),Line(H[0],H[1])));
        }
        else if(g == 2){
            flg = true;
            for(int i = 0;i < h;i++){
                int j = (i+1)%h;
                if(intersectSS(Line(G[0],G[1]),Line(H[i],H[j])))flg = false;
            }
        }
        if(flg)cout<<"YES"<<endl;
        else cout<<"NO"<<endl;
    }
    return 0;
}

Measured memory_bytes: 1268