#include <iostream>
using namespace std;

class Square{
public:
	Square() : mTop( 0.0 ), mBottom( 0.0 ), mRight( 0.0 ), mLeft( 0.0 ){}

	double mTop, mBottom, mRight, mLeft;
};

int main(){
	Square a, b;

	while ( cin >> a.mLeft >> a.mBottom >> a.mRight >> a.mTop
				>> b.mLeft >> b.mBottom >> b.mRight >> b.mTop ){
		if ( !( a.mLeft > b.mRight || a.mRight < b.mLeft )
			&& !( a.mTop < b.mBottom || a.mBottom > b.mTop ) ){
			cout << "YES" << endl;
		}else{
			cout << "NO" << endl;
		}
	}
}