import std.stdio,std.string,std.conv;

int main()
{
	string s;
	while((s = readln.chomp).length != 0)
	{
		string[] _s = s.split(" ");
		double a[8];
		foreach(i;0..8)
		{
			a[i] = _s[i].to!double;
		}
		
		if(a[6] < a[0] || a[2] < a[4] || a[7] < a[1] || a[3] < a[5])
		{
			writeln("NO");
		}
		else
		{
			writeln("YES");
		}
	}
	return 0;
}