program main implicit none integer::D1,D2,D3,S read *,D1,D2,D3,S if(S.eq.1.or.(D1+D2+D3.le.1)) then print '(a)',"SURVIVED" else print '(a)',"DEAD" end if end program main