while str = STDIN.gets

  break if str == "\n"

  (xa1, ya1, xa2, ya2, xb1, yb1, xb2, yb2) = str.chomp.split(/ /).map(&:to_f)

  puts (xa1 <= xb2 && xa2 >= xb1) && (ya1 <= yb2 && ya2 >= yb1) ? "YES" : "NO"

end