#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <map>
#include <set>
#include <queue>
#include <algorithm>
#include <cstring>
#include <cmath>
#include <sstream>
#include <vector>
#include <string>
#include <iomanip>
#include <bitset>
using namespace std;
#define INF	100000000
#define pb push_back
#define mp make_pair
#define fi first
#define sec second
#define lb lower_bound
#define ub upper_bound
#define SS stringstream
#define rep(i,n) for(int i = 0; i < n; i++)
#define sz(x) ((int)(x).size())
#define SORT(x) sort((x).begin(), (x).end())
#define clr(a,b) memset((a),(b),sizeof(a))
typedef pair<int, int> P;
typedef long long int ll;
typedef vector<int> Vi;
typedef vector<ll> Vll;
typedef vector<P> Vp;
typedef priority_queue<int> PQ;

int main(){
	double xa1, ya1, xa2, ya2, xb1, yb1, xb2, yb2;
	while(cin >> xa1 >> ya1 >> xa2 >> ya2 >> xb1 >> yb1 >> xb2 >> yb2){
		if(xa1 <= xb1 && ya1 <= yb1 && xa2 >= xb2 && ya2 >= yb2) cout << "YES" << endl;
		else if(xb1 <= xa1 && xa1 <= xb2 && ya1 <= yb1 && ya2 >= yb2) cout << "YES" << endl;
		else if(xb1 <= xa2 && xa2 <= xb2 && ya1 <= yb1 && ya2 >= yb2) cout << "YES" << endl;
		else if(yb1 <= ya1 && ya1 <= yb2 && xa1 <= xb1 && xa2 >= xb2) cout << "Yes" << endl;
		else if(yb1 <= ya2 && ya2 <= yb2 && xa1 <= xb1 && xa2 >= xb2) cout << "Yes" << endl;
		else if(xb1 <= xa1 && xa1 <= xb2 && yb1 <= ya1 && ya1 <= yb2) cout << "YES" << endl;
		else if(xb1 <= xa1 && xa1 <= xb2 && yb1 <= ya2 && ya2 <= yb2) cout << "YES" << endl;
		else if(xb1 <= xa2 && xa2 <= xb2 && yb1 <= ya1 && ya1 <= yb2) cout << "YES" << endl;
		else if(xb1 <= xa2 && xa2 <= xb2 && yb1 <= ya2 && ya2 <= yb2) cout << "YES" << endl;
		else cout << "NO" << endl;
	}
}