D1,D2,D3,S = map(int,input().split()) L = list() L.append(D1) L.append(D2) L.append(D3) flag = L.count(1) if S == 0 : if flag >= 2 : print("DEAD") else : print("SURVIVED") else : print("SURVIVED")