#include<iostream>

int main()
{
	double x[2][2], y[2][2];
	
	while( 1 ){
		for( int i = 0; i < 2; i++ ){
			for( int j = 0; j < 2; j++ ){
				if( !( std::cin >> x[i][j] >> y[i][j] ) ) goto end;
			}
		}
		
		if( x[0][1] >= x[1][0] && x[0][0] <= x[1][1] && y[0][1] >= y[1][0] && y[0][0] <= y[1][1] ){
			std::cout << "YES" << std::endl;
		}
		else{
		 	std::cout << "NO" << std::endl;
		}
	}
end:

 	return 0;
}