{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE BangPatterns #-} import Control.Applicative import Control.Monad import Control.Arrow import Data.List import Data.Maybe import Data.Char import Text.Printf readInt = ( readLn :: IO Int ) getInts = map ( read :: String -> Int ) . words <$> getLine which a b f = if f then a else b mp [ a, b ] = ( a, b ) main = do [ d1, d2, d3, s ] <- map read . words <$> getLine putStrLn $ if s == 1 || d1 + d2 + d3 < 2 then "SURVIVED" else "DEAD"