#include<iostream>
#include<cmath>
#include<cfloat>
#include<string>
using namespace std;

bool isoutside(double lx,double ly,double hx,double hy,double x,double y)
{
    return (lx>x ||ly>y || x>hx || y > hy  );
}

int main()
{
    double ax[4],ay[4],bx[4],by[4];
    while(cin>>ax[0]>>ay[0]>>ax[2]>>ay[2]>>bx[0]>>by[0]>>bx[2]>>by[2])
    {
        string ans = "NO";
        ax[1]=ax[0];ax[3]=ax[2];
        ay[1]=ay[2];ay[3]=ay[0];
        bx[1]=bx[0];bx[3]=bx[2];
        by[1]=by[2];by[3]=by[0];
        for(int i=0;i<4;i++)
        {
            if(!(isoutside(ax[0],ay[0],ax[2],ay[2],bx[i],by[i])) )
            {
                ans = "YES";
            }
            if(!(isoutside(bx[0],by[0],bx[2],by[2],ax[i],ay[i])) )
            {
                ans = "YES";
            }
        }
        cout << ans << endl;        
    }
    return 0;
}