flags = list(map(int, input().split())) if flags.count(0) >= 0: print('SURVIVED') elif flags.count(1) >= 2: print('DEAD') else: print('SURVIVED')