import Control.Applicative
import Control.Monad
data Rect = Rect Double Double Double Double

-- x1 < x2
-- y1 < y2

main = do
    line <- lines<$>getContents
    mapM_ solve line

solve :: String -> IO ()
solve str = do
    let ps = map read.words $ str
        (a,b) = splitAt 4 ps
        (rectA,rectB) = (toRect a, toRect b)
    if isIntersect rectA rectB then putStrLn "YES" else putStrLn "NO"

isIntersect :: Rect -> Rect -> Bool
isIntersect (Rect xa1 ya1 xa2 ya2) (Rect xb1 yb1 xb2 yb2)
  | ya1 > yb2 || ya2 < yb1 = False
  | xa1 > xb2 || xa2 < xb1 = False
  | otherwise = True

toRect [a,b,c,d] = Rect a b c d