#define _USE_MATH_DEFINES
#include <bits/stdc++.h>
using namespace std;

#define rep(i, n) REP(i, 0, n)
#define ALL(v) v.begin(), v.end()
#define MSG(a) cout << #a << " " << a << endl;
#define REP(i, x, n) for (int i = x; i < n; i++)
#define OP(m) cout << m << endl
typedef long long ll;
typedef unsigned long long ull;

int main()
{
    double xa1, ya1, xa2, ya2, xb1, yb1, xb2, yb2;
    while (cin >> xa1 >> ya1 >> xa2 >> ya2 >> xb1 >> yb1 >> xb2 >> yb2)
    {
        if (max(xa1, xb1) <= min(xa2, xb2) && max(ya1, yb1) <= min(ya2, yb2))
        {
            OP("YES");
        }
        else
        {
            OP("NO");
        }
    }
    return 0;
}
