class Square
  def initialize(x1, y1, x2, y2)
    @point_lb = [x1, y1]
    @point_rt = [x2, y2]
    @point_rb = [x2, y1]
    @point_lt = [x1, y2]
  end

  attr_accessor :point_lb, :point_rb, :point_lt, :point_rt

  def points
    [@point_lb, @point_rb, @point_lt, @point_rt]
  end

  def intersection?(point)
    @point_lb[0] <= point[0] && point[0] <= @point_rt[0] &&
    @point_lb[1] <= point[1] && point[1] <= @point_rt[1]
  end
end

while data = gets
  datas = data.split(" ").map(&:to_f)
  square1 = Square.new(datas[0], datas[1], datas[2], datas[3])
  square2 = Square.new(datas[4], datas[5], datas[6], datas[7])
  ans = false
  square2.points.each do |point|
    ans = square1.intersection?(point)
    break if ans
  end
  unless ans then
    square1.points.each do |point|
      ans = square2.intersection?(point)
      break if ans
    end
  end
  puts ans ? "YES" : "NO"
end