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

typedef complex<double> P;
typedef pair<P,P> L;

const double EPS = 1e-8;

namespace std {
  bool operator < (const P& a, const P& b){
    return fabs(real(a)-real(b)) < EPS ? imag(a) < imag(b) : real(a) < real(b);
  }
}

double dot(P a, P b){ return real(conj(a)*b); }

double cross(P a, P b){ return imag(conj(a)*b); }

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

vector<P> convex_hull(vector<P> v){
  vector<P> c; //convex
  sort(v.begin(),v.end());
  c.assign(v.begin(),v.begin()+2);
    
  for(int i=2;i<v.size();i++){
    P a = c[c.size()-1] - c[c.size()-2];
    P b = v[i] - c[c.size()-2];
        
    while(cross(a,b) > EPS){
      c.pop_back();
      if(c.size() < 2) break;
      a = c[c.size()-1] - c[c.size()-2];
      b = v[i] - c[c.size()-2];
    }
        
    c.push_back(v[i]);
  }
	
  int n = c.size();
  c.push_back(v[v.size()-2]);
	
  for(int i=v.size()-3;i>=0;i--){
    P a = c[c.size()-1] - c[c.size()-2];
    P b = v[i] - c[c.size()-2];
        
    while(cross(a,b) > EPS){
      c.pop_back();
      if(c.size() < n + 1) break;
      a = c[c.size()-1] - c[c.size()-2];
      b = v[i] - c[c.size()-2];
    }
        
    c.push_back(v[i]);
	}
  c.pop_back();
  return c;
}

L get2points(vector<P> p){
  
  double dis=0;
  int idx1, idx2;
  
  for(int i=0;i<p.size();i++){
    for(int j=i+1;j<p.size();j++){
      if(abs(p[j]-p[i])>dis){
	dis=abs(p[j]-p[i]);
	idx1=i;
	idx2=j;
      }
    }
  }

  return L(p[idx1],p[idx2]);
}

bool isIntersectSP(L s, P p){ 
  return abs(s.first-p) + abs(s.second-p) - abs(s.second-s.first) < EPS; 
}

bool check(vector<P> p){
  
  L l=get2points(p);
  
  for(int i=0;i<p.size();i++)
    if(!isIntersectSP(l,p[i])) return false;

  return true;
}

bool isIntersect(L s1, L s2){
  
  //ccw ??????????????????????????¨, ????????????????????´?????????????????¨??????????????????????????????
  if(max(real(s1.first), real(s1.second)) + EPS < min(real(s2.first), real(s2.second)) ||
     max(imag(s1.first), imag(s1.second)) + EPS < min(imag(s2.first), imag(s2.second)) ||
     max(real(s2.first), real(s2.second)) + EPS < min(real(s1.first), real(s1.second)) ||
     max(imag(s2.first), imag(s2.second)) + EPS < min(imag(s1.first), imag(s1.second))) return false;

  return ( ccw(s1.first,s1.second,s2.first) * ccw(s1.first,s1.second,s2.second) <= 0 &&
           ccw(s2.first,s2.second,s1.first) * ccw(s2.first,s2.second,s1.second) <= 0 );
}

int main(){
  
  while(1){
    
    int n, m;
    cin>>n>>m;
    
    if(!n&&!m) break;
    
    vector<P> p1, p2;

    for(int i=0;i<n;i++){
      int a, b;
      cin>>a>>b;
      p1.push_back(P(a,b));
    }
    
    for(int i=0;i<m;i++){
      int a, b;
      cin>>a>>b;
      p2.push_back(P(a,b));
    }

    bool ans=true;

    vector<P> v1, v2;
    
    if(p1.size()!=1){
      
      if(check(p1)){
	L l=get2points(p1);
	for(int i=0;i<p2.size();i++)
	  if(isIntersectSP(l,p2[i])) ans=false;
	v1.push_back(l.first);
	v1.push_back(l.second);
      }else{
	vector<P> p=convex_hull(p1);
	
	for(int i=0;i<p2.size();i++){
	  int com=ccw(p[0],p[1],p2[i]);
	  int flag=0;
	  for(int j=0;j<p.size();j++)
	    if(com!=ccw(p[j],p[(j+1)%p.size()],p2[i])) flag=1;
	  if(flag==0) ans=false;
	}
	
	for(int i=0;i<p.size();i++)
	  for(int j=0;j<p2.size();j++)
	    if(isIntersectSP(L(p[i],p[(i+1)%p.size()]),p2[j])) ans=false;
	v1=p;
      }
      
    }
    
    if(p2.size()!=1){
      
      if(check(p2)){
	L l=get2points(p2);
	for(int i=0;i<p1.size();i++)
	  if(isIntersectSP(l,p1[i])) ans=false;
	v2.push_back(l.first);
	v2.push_back(l.second);
      }else{
	vector<P> p=convex_hull(p2);
	
	for(int i=0;i<p1.size();i++){
	  int com=ccw(p[0],p[1],p1[i]);
	  int flag=0;
	  for(int j=0;j<p.size();j++)
	    if(com!=ccw(p[j],p[(j+1)%p.size()],p1[i])) flag=1;
	  if(flag==0) ans=false;
	}

	for(int i=0;i<p.size();i++)
	  for(int j=0;j<p1.size();j++)
	    if(isIntersectSP(L(p[i],p[(i+1)%p.size()]),p1[j])) ans=false;
	v2=p;
      }
      
    }
    
    if(p1.size()!=1&&p2.size()!=1){
      
      for(int i=0;i<v1.size();i++)
	for(int j=0;j<v2.size();j++){
	  L l1=L(v1[i],v1[(i+1)%v1.size()]);
	  L l2=L(v2[j],v2[(j+1)%v2.size()]);
	  if(isIntersect(l1,l2)) ans=false;
	}
      
    }
    
    if(ans) cout<<"YES"<<endl;
    else cout<<"NO"<<endl;
    
  }  
  
  return 0;
}

Measured memory_bytes: 3132