#include <bits/stdc++.h>
using namespace std;
typedef complex<double> P;
typedef pair<P,char> PP;
const double EPS = 1e-8;
namespace std {bool operator < (const P& a, const P& b) {return real(a)!=real(b)?real(a)<real(b):imag(a)<imag(b);}}
double cross(const P& a, const P& b) {return imag(conj(a)*b);}
double dot(const P& a, const P& b) {return real(conj(a)*b);}

int ccw(P a, P b, P c) {
  b-=a;c-=a;
  if(cross(b,c)>EPS)return +1;
  if(cross(b,c)<-EPS)return -1;
  if(dot(b,c)<-EPS)return +2;
  if(norm(b)<norm(c))return -2;
  return 0;
}

vector<P> convex_hull(vector<P> p) {
  int n=p.size(),k=0;
  if(n==1) return p;
  sort(p.begin(),p.end());
  vector<P> q(2*n);
  for(int i=0;i<n;q[k++]=p[i++])while(k>=2&&ccw(q[k-2],q[k-1],p[i])<=0)--k;
  for(int i=n-2,t=k+1;i>=0;q[k++]=p[i--])while(k>=t&&ccw(q[k-2],q[k-1],p[i])<=0)--k;
  q.resize(k-1);
  return q;
}

int contains(vector<P> v, P p){ 
  bool in=false; 
  for(int i=0;i<v.size();i++){ 
    P a=v[i]-p; 
    P b=v[(i+1)%v.size()]-p; 
    if(imag(a)>imag(b)) swap(a,b); 
    if((imag(a)<=0||fabs(imag(a))<=EPS)&&EPS<imag(b)) 
      if(cross(a,b)<-EPS) in=!in; 
    if(fabs(cross(a,b))<=EPS&&dot(a,b)<EPS) return 1; 
  } 
  return in?2:0; 
}

bool intersect_1pt(P a,P b,P c,P d,P &r) {
  double D=cross(b-a,d-c);
  if(fabs(D)<EPS) return false;
  double t=cross(c-a,d-c)/D;
  double s=-1*cross(a-c,b-a)/D;
  r=a+t*(b-a);
  return((t > 0||fabs(t)<EPS)&&(t<1||fabs(t-1)<EPS)&&(s>0||fabs(s)<EPS)&&(s<1||fabs(s-1)<EPS));
}

vector<P> convex_intersect(vector<P> v1,vector<P> v2) {
  int n=v1.size(),m=v2.size();
  int a=0,b=0,aa=0,ba=0,in=2;
  vector<P> v3;
  do {
    int a1=(a+n-1)%n,b1=(b+m-1)%m;
    double A=cross(v1[a1]-v2[b],v1[a]-v2[b]);
    double B=cross(v2[b1]-v1[a],v2[b]-v1[a]);
    double C=cross(v1[a]-v1[a1],v2[b]-v2[b1]);
    P r;
    if(intersect_1pt(v1[a1],v1[a],v2[b1],v2[b],r)){
      if(in==2) aa=ba=0;
      v3.push_back(r);
      in=B>0?0:A>0?1:in;
    }
    if(C==0&&B==0&&A==0){
      if(in==0){b=(b+1)%m;ba++;}
      else {a=(a+1)%n;aa++;}
    } else if(C>=0){
      if(A>0){
        if(in==0) v3.push_back(v1[a]);
        a=(a+1)%n;
        aa++;
      } else {
        if(in==1) v3.push_back(v2[b]);
        b=(b+1)%m;
        ba++;
      }
    } else {
      if(B>0){
        if(in==1) v3.push_back(v2[b]);
        b=(b+1)%m;
        ba++;
      } else {
        if(in==0) v3.push_back(v1[a]);
        a=(a+1)%n;
        aa++;
      }
    }
  } while((aa<n||ba<m)&&aa<2*n&&ba<2*m);
  if(in==2){
    if(contains(v2,v1[0])) return v1;
    if(contains(v1,v2[0])) return v2;
  }
  return v3;
}

int main() {
  int n,m;
  while(cin >> n >> m && n) {
    vector<P> v[2];
    for(int i=0; i<n; i++) {
      double x,y;
      cin >> x >> y;
      v[0].push_back(P(x,y));
    }
    for(int i=0; i<m; i++) {
      double x,y;
      cin >> x >> y;
      v[1].push_back(P(x,y));
    }
    for(int i=0; i<2; i++) v[i]=convex_hull(v[i]);
    if(!v[0].size()||!v[1].size()||v[0].size()==1&&v[1].size()==1) {
      cout << "YES" << endl;
      continue;
    }
    vector<P> ans=convex_intersect(v[0],v[1]);
    if(ans.size()) cout << "NO" << endl;
    else cout << "YES" << endl;
  }
  return 0;
}
