#include <stdio.h>

int main(void){
    double xa1,ya1,xa2,ya2,xb1,yb1,xb2,yb2;

    while (scanf("%lf", &xa1)!=EOF){
        scanf("%lf %lf %lf", &ya1, &xa2, &ya2);
        scanf("%lf %lf %lf %lf",&xb1, &yb1, &xb2, &yb2);
        if (xa1 > xb2){
            printf("NO\n"); continue;
        }
        if (xa2 < xb1){
            printf("NO\n"); continue;
        }
        if (ya1 > yb2){
            printf("NO\n"); continue;
        }
        if (ya2 < yb1){
            printf("NO\n"); continue;
        }
        printf("YES\n");
    }

    return 0;
}