d1,d2,d3,s = map(int,input().split()) line = [d1,d2,d3] line1 = line.count(1) print('SURVIVED') if s or line1 < 2 else print('DEAD')