using System;

public class _0059 {
	public _0059() {
	}

	public void Run() {
		string str;
		float[] vals;
		while((str = Console.ReadLine()) != null) {
			vals = Array.ConvertAll(str.Split(), s => float.Parse(s));
			Console.WriteLine((vals[0] <= vals[6] && vals[4] <= vals[2] && vals[1] <= vals[7] && vals[5] <= vals[3]) ? "YES" : "NO");
		}
	}
	public static void Main() {
		var program = new _0059();
		program.Run();
	}
}