#include<cstdio>
#include<cmath>
#include<algorithm>
#include<iostream>
#include<string>
#include <vector>
#include <map>
#include<cstdlib>


using namespace std;

void Solution()
{
    double xa1, ya1;
    double xa2, ya2;
    double xb1, yb1;
    double xb2, yb2;
    
    while(cin>>xa1>>ya1>>xa2>>ya2>>xb1>>yb1>>xb2>>yb2)
    {
        if(xa1 <= xb2 &&  //based the picture from question
           xb1 <= xa2 &&
           ya1 <= yb2 &&
           yb1 <= ya2)
        {
            cout<<"YES"<<endl;
        }
        else
        {
            cout<<"NO"<<endl;
        }
    }
}

int main()
{
    Solution();
    return 0;
}