#include <iostream>

std::pair<double, double> to_pair(const double &d1, const double &d2){
	if (d1 > d2){
		return std::make_pair(d1, d2);
	}else{
		return std::make_pair(d2, d1);
	}
}
int main(){
	double xa1, ya1, xa2, ya2, xb1, yb1, xb2, yb2;
	while (std::cin >> xa1){
		std::cin >> ya1 >> xa2 >> ya2 >> xb1 >> yb1 >> xb2 >> yb2;
		std::pair<double, double> xa = to_pair(xa1, xa2);
		std::pair<double, double> ya = to_pair(ya1, ya2);
		std::pair<double, double> xb = to_pair(xb1, xb2);
		std::pair<double, double> yb = to_pair(yb1, yb2);
		if ((xa.first >= xb.first and xb.first >= xa.second) or (xb.first >= xa.first and xa.first >= xb.second)){
			if ((ya.first >= yb.first and yb.first >= ya.second) or (yb.first >= ya.first and ya.first >= yb.second)){
				std::cout << "YES\n";
			}else{
				std::cout << "NO\n";
			}
		}else{
			std::cout << "NO\n";
		}
	}
}