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



void main() {
    string[] input = new string[](8);

    while ((input = readln.chomp.split(" ")).length != 0) {
        auto points = input.map!(to!double);

        if (points[0] <= points[6] &&
            points[2] >= points[4] &&
            points[1] <= points[7] &&
            points[3] >= points[5]) {
            writeln("YES");
        } else {
            writeln("NO");
        }
    }
}