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


void main()
{
	foreach (line; stdin.byLine) {
    auto a = line.chomp.split.map!(to!double).array;
    if (a[7] < a[1] || a[6] < a[0] || a[2] < a[4] || a[3] < a[5]) {
      writeln("NO");
    } else {
      writeln("YES");
    }
  }
}