void toRectangle(P p1, P p2, Rectangle &r){
	r.ps[0] = {p1.x, p2.y};
	r.ps[1] = p2;
	r.ps[2] = p1;
	r.ps[3] = {p2.x, p1.y};
}

const double EPS = 1e-8;

double abs(double d){
	return (d>0)?d:-d;
}

// r1の各4点がr2の中にいくつあるか
int intersectionOfPoints(Rectangle r1, Rectangle r2){
	double ub_x = r2.ps[1].x, lb_x = r2.ps[0].x,
		ub_y = r2.ps[0].y, lb_y = r2.ps[2].y;

	int res = 0;
	for(int i=0;i<4;i++){
		P p = r1.ps[i];
		if((abs(p.x-lb_x) < EPS || (lb_x < p.x && p.x < ub_x) || abs(p.x-ub_x) < EPS) &&
			 (abs(p.y-lb_y) < EPS || (lb_y < p.y && p.y < ub_y) || abs(p.y-ub_x) < EPS)){
			res++;
		}
	}

	return res;
}

bool intersectionOfRectangles(Rectangle r1, Rectangle r2){
	int ior1 = intersectionOfPoints(r1, r2),
		ior2 = intersectionOfPoints(r2, r1);
	if(ior1 > 0 || ior2 > 0){
		return true;
	}
	return false;
}

int main(){
	P ps[4];
	Rectangle r[2];
	while(std::cin >> ps[0].x >> ps[0].y >> ps[1].x >> ps[1].y >> ps[2].x >> ps[2].y >> ps[3].x >> ps[3].y, !std::cin.eof()){
		toRectangle(ps[0], ps[1], r[0]);
		toRectangle(ps[2], ps[3], r[1]);

		if(intersectionOfRectangles(r[0], r[1])){
			std::cout << "YES" << std::endl;
		}else{
			std::cout << "NO" << std::endl;
		}
	}
}