import std.stdio;
import std.algorithm;
import std.string;
import std.conv;
import std.math;

void main(){

    while(true){
	auto s = readln();
	if(stdin.eof()) break;
	auto s1 = split(s);
	real[4] x,y;
	real[4] x1,y1;
	int count = 0;
	for(int i=0;i<2;i++){
	    for(int j=0;j<2;j++){
		x[count] = to!real(s1[2*(i%2)]);
		y[count] = to!real(s1[2*(j%2)+1]);
		count++;
	    }
	}

	count = 0;
	for(int i=0;i<2;i++){
	    for(int j=0;j<2;j++){
		x1[count] = to!real(s1[2*(i%2)+4]);
		y1[count] = to!real(s1[2*(j%2)+5]);
		count++;
	    }
	}

	bool flg=false;
	for(int i=0;i<4;i++){
	    if(x1[0]<=x[i]&&y1[0]<=y[i]&&x[i]<=x1[3]&&y[i]<=y1[3]){
		flg = true;
	    }
	    if(x[0]<=x1[i]&&y[0]<=y1[i]&&x1[i]<=x[3]&&y1[i]<=y[3]){
		flg = true;
	    }
	}
	if(flg) writeln("YES");
	else writeln("NO");
    }
}