#include <iostream>
#include <vector>
#include <algorithm>
#include <cstdio>
#include <string>
#include <map>


#define rep(x,to) for(int x=0;x<to;x++)
#define rep2(x,from,to) for(int x=from;x<to;x++)

using namespace std;


int main(void){

double xa1, ya1, xa2, ya2, xb1, yb1, xb2, yb2;
	while(!cin.eof()){
		cin >> xa1 >> ya1 >> xa2 >> ya2;
		cin >> xb1 >> yb1 >> xb2 >> yb2;
		if( cin.eof()  ) break;
		
		string ans = "YES";
		if(xa1>xb2 || ya1>yb2 || xa2<xb1 || ya2<yb1) ans = "NO";
		
		cout << ans << endl;
	}
	return 0;
	
	
}