#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <set>
#include <map>

#define x 0
#define y 1
using namespace std;

int main()
{
    double a[2][2];
    double b[2][2];
    bool flag;
    while(cin >> a[0][x] >> a[0][y] >> a[1][x] >> a[1][y])
    {
        cin >> b[0][x] >> b[0][y] >> b[1][x] >> b[1][y];
        flag = !(a[1][x] < b[0][x] || b[1][x] < a[0][x] ||
                 a[1][y] < b[0][y] || b[1][y] < a[0][y] );
        if(flag) cout << "YES" << endl;
        else cout << "NO" << endl;
    }
}