#include<stdio.h>

int main(){
	double xa1,ya1,xa2,ya2,xb1,yb1,xb2,yb2;
	
	while(0<=scanf("%lf%lf%lf%lf%lf%lf%lf%lf",&xa1,&ya1,&xa2,&ya2,&xb1,&yb1,&xb2,&yb2)){
		if( (xa1>=xb1 && xa1<=xb2) && (yb1<=ya2 && ya2<=yb2) ){
			printf("YES\n");
			continue;
		}
		
		if( (xa2>=xb1 && xa2<=xb2) && (yb1<=ya2 && ya2<=yb2) ){
			printf("YES\n");
			continue;
		}
		
		if( (xa1>=xb1 && xa1<=xb2) && (yb1<=ya2 && ya2<=yb2) ){
			printf("YES\n");
			continue;
		}
		
		if( (xa1>=xb1 && xa1<=xb2) && (yb1<=ya2 && ya2<=yb2) ){
			printf("YES\n");
			continue;
		}

		if( (xb1>=xa1 && xb1<=xa2) && (ya1<=yb2 && yb2<=ya2) ){
			printf("YES\n");
			continue;
		}
		
		if( (xb2>=xa1 && xb2<=xa2) && (ya1<=yb2 && yb2<=ya2) ){
			printf("YES\n");
			continue;
		}
		
		if( (xb1>=xa1 && xb1<=xa2) && (ya1<=yb1 && yb1<=ya2) ){
			printf("YES\n");
			continue;
		}
		
		if( (xb2>=xa1 && xb2<=xa2) && (ya1<=yb1 && yb1<=ya2) ){
			printf("YES\n");
			continue;
		}

		printf("NO\n");
	}
	return 0;
}