#include<iostream>
using namespace std;

int main()
{
    double xa1, ya1, xa2, ya2, xb1, yb1, xb2, yb2;

    while( cin >> xa1 >> ya1 >> xa2 >> ya2 >> xb1 >> yb1 >> xb2 >> yb2 )
    {
        bool judge = true;
        if( xb2 < xa1 )
            judge = false;
        else if( ya2 < yb1 )
            judge = false;
        else if( yb2 < ya1 )
            judge = false;
        else if( xa2 < xb1 )
            judge = false;
        else;

        if( judge == true )
            cout << "YES" << endl;
        else
            cout << "NO" << endl;
    }
    return 0;
}
