A = raw_input() D1,D2,D3,S = A.split(' ') if int(S) == 1: print "SURVIVED" elif (int(D1)+int(D2)+int(D3)) >1: print "DEAD" else: print "SURVIVED"