while line = gets
  xa1, ya1, xa2, ya2, xb1, yb1, xb2, yb2 = line.split.map(&:to_f)

  if (xa1 <= xb1 && xb1 <= xa2) || (xa1 <= xb2 && xb2 <= xa2)
    if (ya1 <= yb1 && yb1 <= ya2) || (ya1 <= yb2 && yb2 <= ya2)
      puts 'YES'
      next
    end
  end

  puts 'NO'
end