main = interact $ unlines . map (show' . intersection_of_rect . map (read::String->Float) . words) . lines
 where show' p = case p of {True -> "YES"; False -> "NO"}
 
intersection_of_rect [xa1, ya1, xa2, ya2, xb1, yb1, xb2, yb2] =
 intersection_of_line xa1 xa2 xb1 xb2 && intersection_of_line ya1 ya2 yb1 yb2
  where
   intersection_of_line a1 a2 b1 b2
    | a2 >= b1 && a1 <= b2 = True
    | otherwise = False