#include <cstdio>
using namespace std;

int main()
{
	double a[8];
	
	while (1){
		for (int i = 0; i < 8; i++){
			if (scanf("%lf", &a[i]) == EOF){
				return 0;
			}
		}
		
		printf(!(a[4] > a[2] || a[5] > a[3] || a[6] < a[0] || a[7] < a[1]) ? "YES\n" : "NO\n");
	}
}