#include <iostream>
#include <vector>
#include <algorithm>
#include <bitset>
 
#define INPUT_FROM_FILE (0) 
#if INPUT_FROM_FILE
#include <fstream>
#endif
 
int main(){
	double xa1, ya1, xa2, ya2, xb1, yb1, xb2, yb2;
 
#if INPUT_FROM_FILE
    //std::ifstream ifs("test.txt");
    FILE *fp = fopen("test.txt", "r");
#endif
 
#if INPUT_FROM_FILE
	while(fscanf(fp, "%lf %lf %lf %lf %lf %lf %lf %lf", &xa1, &ya1, &xa2, &ya2, &xb1, &yb1, &xb2, &yb2) != EOF){
#else
	while(scanf("%lf %lf %lf %lf %lf %lf %lf %lf", &xa1, &ya1, &xa2, &ya2, &xb1, &yb1, &xb2, &yb2) != EOF){
#endif
		if(((xa1 <= xb2 && xb2 <= xa2) || (xa1 <= xb1 && xb1 <= xa2) ||
			(xb1 <= xa2 && xa2 <= xb2) || (xb1 <= xa1 && xa1 <= xb2)) &&
			((ya1 <= yb2 && yb2 <= ya2) || (ya1 <= yb1 && yb1 <= ya2) ||
			(yb1 <= ya2 && ya2 <= yb2) || (yb1 <= ya1 && ya1 <= yb2))){
			std::cout << "YES" << std::endl;
		}
		else{
			std::cout << "NO" << std::endl;
		}
	}
 
#if INPUT_FROM_FILE
#else
#endif
 
#if INPUT_FROM_FILE
	fclose(fp);
#endif
    return 0;
}
