#include <iostream>
#include <cstdio>
#include <vector>
#include <string>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <algorithm>
#include <set>
#include <map>
#include <iomanip>
#include <utility>

using namespace std;

#define mp make_pair
#define pb push_back
#define fi first
#define se second

typedef long long LL;
typedef long double LD;
typedef vector <int> VI;
typedef vector <VI> VVI;
typedef vector <string> VS;

template <class T>
inline T sql(T a) { return a*a; }

#define filename "trian"

const LL INF=1000000000000000000LL;

struct P {
	LL x,y;
	P(): x(0),y(0) {}
	P(LL x,LL y): x(x),y(y) {}
};

bool operator==(P a,P b) {
	return a.x==b.x && a.y==b.y;
}

LL operator*(P a,P b) {
	return a.x*b.y-a.y*b.x;
}

P operator-(P a,P b) {
	return P(a.x-b.x,a.y-b.y);
}

inline int sign(LL a) {
	if (a<0) return -1;
	return a>0;
}

inline int test(P a,P b,P c,P d) {
	if (a==b && c==d) return a==c;
	P v=a-b;
	if (sign(v*(c-b))*sign((d-b)*v)<0) return 0;
	v=c-d;
	if (sign(v*(a-d))*sign((b-d)*v)<0) return 0;
	return 1;
}

LL qabs(LL a) {
	if (a<0) return -a; else return a;
}

inline int test2(P a,P x,P y,P z) {
	if (y==z) return a==x;
	if (x==y) return test(a,a,x,z);
	if (x==z) return test(a,a,x,y);
	return qabs((z-x)*(y-x))==qabs((z-a)*(x-a))+qabs((x-a)*(y-a))+qabs((y-a)*(z-a));
}

int main() {
	freopen(filename ".in", "r", stdin);
	freopen(filename ".out", "w", stdout);
	P a[3],b[3];
	LL c,d,c1,d1;
	cin >> a[0].x >> a[0].y;
	a[1]=a[2]=a[0];
	cin >> c >> d;
	a[1].x+=c;a[2].y+=d;
	cin >> b[0].x >> b[0].y;
	b[1]=b[2]=b[0];
	cin >> c1 >> d1;
	b[1].x+=c1;b[2].y+=d1;
	LL mna=INF,mnb=INF,mxa=-INF,mxb=-INF;
	for (int i=0;i<3;i++) {
		mna=min(mna,a[i].x);
		mnb=min(mnb,b[i].x);
		mxa=max(mxa,a[i].x);
		mxb=max(mxb,b[i].x);
	}
	if (mxa<mnb || mxb<mna) {
		cout << "NO";
		return 0;
	}
	mna=INF,mnb=INF,mxa=-INF,mxb=-INF;
	for (int i=0;i<3;i++) {
		mna=min(mna,a[i].y);
		mnb=min(mnb,b[i].y);
		mxa=max(mxa,a[i].y);
		mxb=max(mxb,b[i].y);
	}
	if (mxa<mnb || mxb<mna) {
		cout << "NO";
		return 0;
	}
/*	if (c*d==0 && c1*d1==0) {
		if (c==0 && d==0 || c1==0 && d1==0) {
			cout << "NO";
			return 0;
		} else {
			
		}
	}
	if (c1*d1==0) {
		swap(a[0],b[0]);
		swap(a[1],b[1]);
		swap(a[2],b[2]);
		swap(c,c1);
		swap(d,d1);
	}
	if (c*d==0) {
		if (c==0 && d==0) {
			if (test2(a[0],b[0],b[1],b[2])) {
				cout << "YES";
				return 0;
			} else {
				cout << "NO";
				return 0;
			}
		} else {
			if (c==0) swap(a[1],a[2]);
			if (test2(a[0],b[0],b[1],b[2]) || test(a[0],a[1],b[0],b[1]) || test(a[0],a[1],b[1],b[2]) || test(a[0],a[1],b[2],b[0])) {
				cout << "YES";
				return 0;
			} else {
				cout << "NO";
				return 0;
			}
		}
	}*/
	for (int i=0;i<3;i++) {
		P x=a[i];
		if (test2(x,b[0],b[1],b[2])) {
			cout << "YES";
			return 0;
		}
		x=b[i];
		if (test2(x,a[0],a[1],a[2])) {
			cout << "YES";
			return 0;
		}
	}

	for (int i=0;i<3;i++) {
		P x=a[i],y=a[(i+1)%3];
		for (int j=0;j<3;j++) {
			P x1=b[i],y1=b[(i+1)%3];
			if (test(x,y,x1,y1)) {
				cout << "YES";
				return 0;
			}
		}
	}
	cout << "NO";
	return 0;
}