D1, D2, D3, S = map(int, input().split()) print("SURVIVE" if (S | (D1 & D2) | (D2 & D3) | (D3 & D4)) == 1 else "DEAD")