#include <bits/stdc++.h>
#define rep(i,l,n) for(int i=l;i<n;i++)
#define rer(i,l,n) for(int i=l;i<=n;i++)
#define all(a) a.begin(),a.end()
#define o(a) cout<<a<<endl
#define pb(a) push_back(a)
#define mk(a,b) make_pair(a,b)
#define fi first
#define se second
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int,int> pii;

int main(){
	double xa1,ya1,xa2,ya2,xb1,yb1,xb2,yb2;
	while(1){
		cin>>xa1>>ya1>>xa2>>ya2>>xb1>>yb1>>xb2>>yb2;
		if(cin.eof()) break;
		if(xa1<=xb2 && xb1<=xa2 && yb1<=ya2 && ya1<=yb2) o("YES");
		else o("NO");
	}
}