flug = input().split(" ",4) flug = list(map(int,flug)) if flug.count(1) >= 2 and flug[1] == 1: print("DEAD") else: print("SURVIVED")