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[] inp;
	for(int i=0;i<s1.length;i++){
	    inp ~= to!real(s1[i]);
	}
	if(inp[0]<=inp[6]&&inp[1]<=inp[7]&&inp[4]<=inp[2]&&inp[5]<=inp[3]) writeln("YES");
	else writeln("NO");
    }
}