#include <stdio.h>
#include <stdlib.h>
struct Point
{
	long long x; long long y;
	Point(long long px, long long py) {x=px, y=py;};
	Point(){};
};
struct Segment
{
	Point p1; Point p2;
	Segment(Point tp1, Point tp2) {p1=tp1, p2=tp2;};
	Segment(){};
};
long long operator *(Point a, Point b)
{
	return a.x*b.x+a.y*b.y;
}
long long operator ^(Point a, Point b)
{
	return a.x*b.y-a.y*b.x;
}
Point operator -(Point a, Point b)
{
	return Point(b.x-a.x, b.y-a.y);
}
int Sign(long long x)
{
	if(x==0) return 0; else return x<0?-1:1;
}
bool OnSegment(Point p, Segment s)
{
	return (Sign((p-s.p1)^(p-s.p2))==0)&&(Sign((p-s.p1)*(p-s.p2))<=0);
}
int Side(Point p, Segment s)
{
	return Sign((p-s.p1)^(p-s.p2));
}
bool Intersect(Segment s1, Segment s2)
{
	int sd1=Side(s1.p1, s2), sd2=Side(s1.p2, s2), sd3=Side(s2.p1, s1), sd4=Side(s2.p2, s1);
	if((sd1*sd2<0)&&(sd3*sd4<0)) return true;
	if(OnSegment(s1.p1, s2) || OnSegment(s1.p2, s2) || OnSegment(s2.p1, s1) || OnSegment(s2.p2, s1)) return true;
	return false;
}
void Quit(const char * message)
{
	printf("%s\n", message);
	exit(0);
}
int main()
{
	freopen("trian.in", "r", stdin);
	freopen("trian.out", "w", stdout);
	Segment Triangle[2][3]; int x, y, dx, dy; Point p1, p2, p3;
	for(int i=0; i<2; ++i)
	{
		scanf("%d%d%d%d", &x, &y, &dx, &dy);
		p1=Point(x, y); p2=Point(x+dx, y); p3=Point(x, y+dy);
		Triangle[i][0]=Segment(p1, p2);
		Triangle[i][1]=Segment(p1, p3);
		Triangle[i][2]=Segment(p2, p3);
	}
	for(int i=0; i<3; ++i)
		for(int j=0; j<3; ++j)
			if(Intersect(Triangle[0][i], Triangle[1][j])) Quit("YES");
	Quit("NO");
	return 0;
}
