#include <iostream>
#include <cstdlib>
#include <algorithm>
using namespace std;

struct point {
    double x;
    double y;
};

struct rectangle {
    point p1;
    point p2;
    point p3;
    point p4;
};


rectangle getrectangle(point pone, point ptwo)
{
    rectangle brect;
    if(pone.x > ptwo.x) swap(pone.x, ptwo.x);
    if(pone.y > ptwo.y) swap(pone.y, ptwo.y);
    brect.p1 = pone;
    brect.p2 = ptwo;

    brect.p3.x = pone.x;
    brect.p3.y = ptwo.y;

    brect.p4.x = ptwo.x;
    brect.p4.y = pone.y;

    return brect;
}

bool ispointinrect(rectangle brect, point bp)
{
    if(brect.p1.x > bp.x) return false;
    if(brect.p2.x < bp.x) return false;
    if(brect.p1.y > bp.y) return false;
    if(brect.p2.y < bp.y) return false;
    
    return true;
}

bool isoverrap(rectangle arect, rectangle brect)
{
    if(ispointinrect(arect, brect.p1)) return true;
    if(ispointinrect(arect, brect.p2)) return true;
    if(ispointinrect(arect, brect.p3)) return true;
    if(ispointinrect(arect, brect.p4)) return true;

    return false;
}

int main()
{
    rectangle rect[2];
    point bp[4];
    while(cin 
            >> bp[0].x >> bp[0].y
            >> bp[1].x >> bp[1].y
            >> bp[2].x >> bp[2].y
            >> bp[3].x >> bp[3].y
        )
    {
        rect[0] = getrectangle(bp[0], bp[1]);
        rect[1] = getrectangle(bp[2], bp[3]);
        
        if(isoverrap(rect[0], rect[1])) cout << "YES" << endl;
        else cout << "NO" << endl;
    }

    return EXIT_SUCCESS;
}