D1,D2,D3,S = input(),input(),input(),input() if S == 1: print "SURVIVED" elif (D1+D2+D3) >1: print "DEAD" else: print "SURVIVED"