#include<bits/stdc++.h>
using namespace std;
int main()
{
    double x[4],y[4],xe[2]={},ye[2]={};
    while(cin>>x[0]>>y[0]){
        for(int i=1;i<4;i++)cin>>x[i]>>y[i];
        for(int i=0;i<3;i++){
            xe[0]=max(x[i],xe[0]);
            xe[1]=min(x[i],xe[1]);
            ye[0]=max(y[i],ye[0]);
            ye[1]=min(y[i],ye[1]);
        }
        if(xe[0]>x[3]&&xe[1]<x[3]&&ye[0]>y[3]&&ye[1]<y[3])cout<<"YES"<<endl;
        else cout<<"NO"<<endl;
    }
}