#include <iostream>
#include <vector>
#include <cstdio>
float data[8];
const char* noYes[] = {"NO", "YES"};

int intersect (float *a)
{
    int result = 0;
    result += a[0] < a[6];
    result += a[2] > a[4];
    result += a[1] < a[7];
    result += a[3] > a[5];
    
    return result == 4;
}

int main(int argc, const char * argv[]) {

    std::string line;
    std::vector<std::string> output;
    
    while (std::getline(std::cin, line))
    {
        
        sscanf(line.c_str(), "%f %f %f %f %f %f %f %f",
               &data[0], &data[1], &data[2], &data[3],
               &data[4], &data[5], &data[6], &data[7]);

        output.push_back( noYes[ intersect(data) & 0x01]);

        
    }
    
    
    
    std::vector<std::string>::iterator it = output.begin();
   
    do {
        
        std::cout << *it << std::endl;
    } while (++it < output.end());
    
    
    
    return 0;
}