#include <iostream>
#include <cstdio>
#include <algorithm>
#include <vector>
#include <string>
#include <set>
#include <map>
#include <cstdio>
#include <cmath>
#include <ctime>
#include <utility>

using namespace std;

double vm(double x1, double y1, double x2, double y2) 
{
	return (x1*y2-x2*y1);
}

struct TPoint 
{
	double x, y;
};


bool intersectLines(TPoint a1, TPoint a2, TPoint b1, TPoint b2) 
{
	double v11 = vm(a2.x-a1.x, a2.y-a1.y, b1.x-a1.x, b1.y-a1.y);
	double v12 = vm(a2.x-a1.x, a2.y-a1.y, b2.x-a1.x, b2.y-a1.y);
	double v21 = vm(b2.x-b1.x, b2.y-b1.y, a1.x-b1.x, a1.y-b1.y);
	double v22 = vm(b2.x-b1.x, b2.y-b1.y, a2.x-b1.x, a2.y-b1.y);
	return ((v11 < 0 && v12 > 0 || v11 > 0 && v12 < 0) && 
		    (v21 < 0 && v22 > 0 || v21 > 0 && v22 < 0));
}

bool inTriangle(TPoint a1, TPoint a2, TPoint a3, TPoint b)
{
	double v1 = vm(a1.x-b.x, a1.y-b.y, a2.x-b.x, a2.y-b.y);
	double v2 = vm(a2.x-b.x, a2.y-b.y, a3.x-b.x, a3.y-b.y);
	double v3 = vm(a3.x-b.x, a3.y-b.y, a1.x-b.x, a1.y-b.y);
	return ((v1 <= 0 && v2 <= 0 && v3 <= 0) || (v1 >= 0 && v2 >= 0 && v3 >= 0));
}

int main () 
{
	freopen("trian.in", "r", stdin);
	freopen("trian.out", "w", stdout);

	TPoint a1, a2, a3, b1, b2, b3;
	double aa1, aa2, bb1, bb2;
	cin >> a1.x >> a1.y >> aa1 >> bb1 >> b1.x >> b1.y >> aa2 >> bb2;
	a2.y = a1.y;
	a3.x = a1.x;
	a2.x = a1.x+aa1;
	a3.y = a1.y+bb1;
	b2.y = b1.y;
	b3.x = b1.x;
	b2.x = b1.x+aa2;
	b3.y = b1.y+bb2;

	bool res = false;
	res = res || intersectLines(a1, a2, b1, b2);
	res = res || intersectLines(a1, a2, b1, b3);
	res = res || intersectLines(a1, a2, b2, b3);
	res = res || intersectLines(a1, a3, b1, b2);
	res = res || intersectLines(a1, a3, b1, b3);
	res = res || intersectLines(a1, a3, b2, b3);
	res = res || intersectLines(a2, a3, b1, b2);
	res = res || intersectLines(a2, a3, b1, b3);
	res = res || intersectLines(a2, a3, b2, b3);

	res = res || inTriangle(a1, a2, a3, b1);
	res = res || inTriangle(a1, a2, a3, b2);
	res = res || inTriangle(a1, a2, a3, b3);
	res = res || inTriangle(b1, b2, b3, a1);
	res = res || inTriangle(b1, b2, b3, a2);
	res = res || inTriangle(b1, b2, b3, a3);

	if (res)
		cout << "YES" << endl;
	else 
		cout << "NO" << endl;

	return 0;
}