#include<stdio.h>

int main(){
	double ax,ay,bx,by,cx,cy,dx,dy;
	while(~scanf("%lf%lf%lf%lf%lf%lf%lf%lf",&ax,&ay,&bx,&by,&cx,&cy,&dx,&dy)){
		if((ax>=dx&&by<=cy)||(cx>=bx&&dy<=ay))printf("NO\n");
		else printf("YES\n");
	}
}