#include <iostream>
int main(void){
    double xa1,xa2,ya1,ya2,xb1,xb2,yb1,yb2;
    while(std::cin>>xa1>>ya1>>xa2>>ya2>>xb1>>yb1>>xb2>>yb2){
        if(xa1<=xb2&&xb1<=xa2&&ya1<=yb2&&yb1<=ya2)std::cout<<"YES\n";
        else std::cout<<"NO\n";
    }
    return 0;
}