D=list(map(int,input().split())) S=D.pop(3) if S==1 or D.count(0)>=2: print('SURVIVED') else: print('DEAD')