#include <iostream>
#include <sstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <climits>
#include <cfloat>
using namespace std;

int main()
{
    for(;;){
        double xa1, ya1, xa2, ya2, xb1, yb1, xb2, yb2;
        if(!(cin >> xa1 >> ya1 >> xa2 >> ya2 >> xb1 >> yb1 >> xb2 >> yb2))
            return 0;

        if(ya1 <= yb2 && yb1 <= ya2 && xa1 <= xb2 && xb1 <= xa2)
            cout << "YES" << endl;
        else
            cout << "NO" << endl;
    }
}