while t = gets
	t = t.split.map &:to_f
	ax = [t[0],t[2]].sort
	bx = [t[4],t[6]].sort
	ay = [t[1],t[3]].sort
	by = [t[5],t[7]].sort
	if bx[0].between?(ax[0], ax[1]) || bx[1].between?(ax[0], ax[1])
		if by[0].between?(ay[0], ay[1]) || by[1].between?(ay[0], ay[1])
			puts "YES"
		else
			puts "NO"
		end
	else
		puts "NO"
	end
end