#include<iostream>
#define F(a,b,c,d)!(d<a||b<c)
using namespace std;
main()
{
	double a,b,c,d,e,f,g,h;
	while(cin>>a>>b>>c>>d>>e>>f>>g>>h)
	{
		cout<<(F(a,c,e,g)&&F(b,d,f,h)?"YES":"NO")<<endl;
	}
}

