max' (x,y) = if x>y then x else y
min' (x,y) = if x>y then y else x

solve :: String->IO ()
solve line = do
    let dat = map (\x->read x::Double) $ words line
    let (xa1, ya1) = (dat!!0, dat!!1)
    let (xa2, ya2) = (dat!!2, dat!!3)
    let (xb1, yb1) = (dat!!4, dat!!5)
    let (xb2, yb2) = (dat!!6, dat!!7)
    if ((min' (xa2, xb2))<(max' (xa1, xb1))) ||
       ((min' (ya2, yb2))<(max' (ya1, yb1))) then putStrLn "NO" else putStrLn "YES"

main :: IO ()
main = do
    str <- getContents 
    mapM_ solve $ lines $ str