# No.431 死亡フラグ flags = [int(i) for i in input().split()] if flags[3] == 1 or flags[:2].count(1) < 2: print('SURVIVED') else: print('DEAD')