import Control.Monad

main = do
    a <- map read . words <$> getLine :: IO [Int]
    let isAllIn = 1 `elem` a && 7 `elem` a && 9 `elem` a && 4 `elem` a
    --let ans = filter (/=1) $ filter (/=7) $ filter (/=9) $ filter (/=4) a
    --if length ans == 0 then putStrLn $ "YES" else putStrLn $ "NO"
    if isAllIn then putStrLn $ "YES" else putStrLn $ "NO"