#include<iostream>
using namespace std;
long double x[4], y[4];
int main() {
	while (cin >> x[0] >> y[0]) {
		cin >> x[1] >> y[1];
		cin >> x[2] >> y[2];
		cin >> x[3] >> y[3];
		if (x[0] > x[1])swap(x[0], x[1]);
		if (x[2] > x[3])swap(x[2], x[3]);
		if (y[0] > y[1])swap(y[0], y[1]);
		if (y[2] > y[3])swap(y[2], y[3]);
		int OK = 1;
		if (x[1]<x[2] || x[0]>x[3])OK = 0;
		if (y[1]<y[2] || y[0]>y[3])OK = 0;
		if (OK == 0) { cout << "NO" << endl; }
		if (OK == 1) { cout << "YES" << endl; }
	}
}