#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <cmath>
#define eps 1e-8
using namespace std;
typedef struct point {
    double x,y;
    point(double x=0,double y=0):x(x),y(y) { }
} Vector;
int dcmp(double x) {
    if(fabs(x)<eps) return 0;
    return x<0?-1:1;
}
Vector operator  + (Vector A,Vector B) {
    return Vector(A.x+B.x,A.y+B.y);
}
Vector operator  -  (point A,point B) {
    return Vector(A.x-B.x,A.y-B.y);
}
Vector operator  *  (Vector A,double p) {
    return Vector(A.x*p,A.y*p);
}
Vector operator  /  (Vector A,double p) {
    return Vector(A.x/p,A.y/p);
}
double xmult(point a,point b,point c) {
    return (a.x-c.x)*(b.y-c.y)-(a.y-c.y)*(b.x-c.x);
}
double multi(point a,point b,point c) {
    return (a.x-c.x)*(b.x-c.x)+(a.y-c.y)*(b.y-c.y);
}
bool cmp(point a,point b) {
    if (a.y<b.y) return 1;
    else if (fabs(a.y-b.y)<eps&&a.x<b.x) return 1;
    else return 0;
}
int convex(point *p,point *con,int len) {
    sort(p,p+len,cmp);
    int top;
    con[0]=p[0],con[1]=p[1],top=1;
    for (int i=2; i<len; i++) {
        while (xmult(con[top],p[i],con[top-1])<0&&top>0) top--;
        con[++top]=p[i];
    }
    int top1=top;
    con[++top]=p[len-2];
    for (int i=len-3; i>=0; i--) {
        while (xmult(con[top],p[i],con[top-1])<0&&top>top1) top--;
        con[++top]=p[i];
    }
    return top;
}
bool SegmentProperIntersection(point a1,point a2,point b1,point b2) {
    double c1=xmult(a2,b1,a1),c2=xmult(a2,b2,a1);
    double c3=xmult(b2,a1,b1),c4=xmult(b2,a2,b1);
    return (dcmp(c1)*dcmp(c2)<0)&&(dcmp(c3)*dcmp(c4)<0);
}
bool Onsegment(point P,point a1,point a2) {
    return dcmp(xmult(a1,a2,P))==0&&dcmp(multi(a1,a2,P))<0;
}
bool check(point a1,point a2,point b1,point b2) {
    if (SegmentProperIntersection(a1,a2,b1,b2)) return 1;
    return Onsegment(a1,b1,b2)||Onsegment(a2,b1,b2)||Onsegment(b1,a1,a2)||Onsegment(b2,a1,a2);
}
double area(point *p,int len) {
    if (len<3) return 0;
    double ans=0;
    for (int i=2;i<len;i++) ans+=abs(xmult(p[i],p[i-1],p[0]));
    return ans;
}
int n,m;
point p1[211],p2[211],c1[211],c2[211];
int main() {
    //freopen("1.txt","w",stdout);
    while (~scanf("%d%d",&n,&m)) {
        if (n==0&&m==0) break;
        for (int i=0; i<n; i++) scanf("%lf%lf",&p1[i].x,&p1[i].y);
        for (int i=0; i<m; i++) scanf("%lf%lf",&p2[i].x,&p2[i].y);
        if (n>1) n=convex(p1,c1,n);
        else c1[0]=p1[0];
        if (m>1) m=convex(p2,c2,m);
        else c2[0]=p2[0];
        bool flag=1;
        for (int i=0; i<n; i++) {
            for (int j=0; j<m; j++) {
                if (check(c1[i],c1[(i+1)%n],c2[j],c2[(j+1)%m])) {
                    flag=0;
                    break;
                }
            }
            if (flag==0) break;
        }
        if (n==1) {
            for (int i=0;i<m;i++)
                if (Onsegment(c1[0],c2[i],c2[(i+1)%m])) flag=0;
        }
        if (m==1) {
            for (int i=0;i<n;i++)
                if (Onsegment(c2[0],c1[i],c1[(i+1)%n])) flag=0;
        }
        double s=area(c1,n);
        if (s>0) {
            for (int i=0;i<m;i++) {
                double cnt=0;
                for (int j=0;j<n;j++) cnt+=abs(xmult(c1[j],c1[(j+1)%n],c2[i]));
                if (dcmp(cnt-s)==0) flag=0;
            }
        }
        s=area(c2,m);
        if (s>0) {
            for (int i=0;i<n;i++) {
                double cnt=0;
                for (int j=0;j<m;j++) cnt+=abs(xmult(c2[j],c2[(j+1)%m],c1[i]));
                if (dcmp(cnt-s)==0) flag=0;
            }
        }
        if (flag) printf("YES\n");
        else printf("NO\n");
    }
    return 0;
}

Measured memory_bytes: 1200