fun main(){val(d,e,f,s)=readLine()!!.split(" ").map{it.toInt()} println(if(s>0||(d>0&&e>0||e>0&&f>0||f>0&&d>0))"SURVIVED" else "DEAD")}