D1,D2,D3,S = [int(i) for i in input().split()] if D1+D2+D3 >= 2: if S == 0: print("DEAD") else: print("SURVIVED") else: print("SURVIVED")