D1, D2, D3, S = input().split(' ') print('SURVIVED' if S == '1' or [D1, D2, D3].count('1') < 2 else 'DEAD')