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