省选前练模板系列;
#include<cmath>
#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
using namespace std;
const int maxn=;
const double eps=1e-,inf=1e9;
int n1,n2,m1,m2,pp;
double mi;
int dcmp(double x){if(fabs(x)<eps)return ;return x<?-:;}
struct vec{
double x,y,ang;
vec(){};
vec(double a,double b){x=a,y=b;}
vec operator-(vec a){return vec(x-a.x,y-a.y);}
vec operator+(vec a){return vec(x+a.x,y+a.y);}
bool operator<(const vec&a)const{
return dcmp(x-a.x)<||(dcmp(x-a.x)==&&y<a.y);
}
}p1[maxn],p2[maxn],ch1[maxn],ch2[maxn],p0,t1,t2,t3;
double cross(vec a,vec b){return a.x*b.y-b.x*a.y;}
double dot(vec a,vec b){return a.x*b.x+a.y*b.y;}
bool onli(vec p,vec a1,vec a2){
if(p.x=a1.x&&p.y==a1.y)return ;
if(p.x=a2.x&&p.y==a2.y)return ;
return dcmp(cross(a1-p,a2-p))==&&dcmp(dot(a1-p,a2-p))<;
}
bool jiao(vec a1,vec a2,vec b1,vec b2){
if(!(min(a1.x,a2.x)<=max(b1.x,b2.x)&&min(b1.y,b2.y)<=max(a1.y,a2.y)&&min(b1.x,b2.x)<=max(a1.x,a2.x)&&min(a1.y,a2.y)<=max(b1.y,b2.y)))
return ;
double c1=cross(a2-a1,b1-a1),c2=cross(a2-a1,b2-a1);
double c3=cross(b2-b1,a1-b1),c4=cross(b2-b1,a2-b1);
return dcmp(c1)*dcmp(c2)<=&&dcmp(c3)*dcmp(c4)<=;
}
bool inbao(vec p,vec* a,int n){
if(dcmp(cross(a[]-a[],p-a[]))<||dcmp(cross(a[n-]-a[],p-a[]))>)return ;
if(dcmp(cross(a[]-a[],p-a[]))==){
if(onli(p,a[],a[]))return ;
else return ;
}
if(dcmp(cross(a[n-]-a[],p-a[]))==){
if(onli(p,a[],a[n-]))return ;
else return ;
}
int l=,r=n-;
while(l<r){
int mid=l+r>>;
if(dcmp(cross(p-a[],a[mid]-a[]))>)r=mid;
else l=mid+;
}
//cout<<l<<endl;
if(cross(a[l]-a[l-],p-a[l-])>=)return ;
return ;
}
int build(vec *p,int n,vec *ch){
sort(p,p+n);
int m=;
for(int i=;i<n;++i){
while(m>&&cross(ch[m-]-ch[m-],p[i]-ch[m-])<=)m--;
ch[m++]=p[i];
}
int k=m;
for(int i=n-;i>=;--i){
while(m>k&&cross(ch[m-]-ch[m-],p[i]-ch[m-])<=)m--;
ch[m++]=p[i];
}
if(n>)m--;
return m;
}
void solve(){
for(int i=;i<n1;++i)scanf("%lf%lf",&p1[i].x,&p1[i].y);
for(int i=;i<n2;++i)scanf("%lf%lf",&p2[i].x,&p2[i].y);
if(n1==&&n2==){
if(p1[].x==p2[].x&&p1[].y==p2[].y){puts("No");return;}
else{puts("Yes");return;}
}
m1=build(p1,n1,ch1),m2=build(p2,n2,ch2);
if(m2>){
for(int i=;i<m1;++i)if(inbao(ch1[i],ch2,m2)){puts("No");return;}
}
if(m1>){
for(int i=;i<m2;++i)if(inbao(ch2[i],ch1,m1)){puts("No");return;}
}
for(int i=;i<m1;++i)
for(int j=;j<m2;++j)
if(jiao(ch1[i],ch1[(i+)%m1],ch2[j],ch2[(j+)%m2])){
puts("No");return;
}
puts("Yes");
}
int main(){
while(scanf("%d%d",&n1,&n2)!=EOF&&n1){
solve();
}
return ;
}
/*
4 3
100 600
200 400
600 500
300 700
400 100
600 200
500 300
4 3
100 600
400 100
600 200
500 300
200 400
600 500
300 700
0 0
*/