d=list(map(int,input().split())) if d[-1]==1: print("SURVIVED") elif sum(d[0:3])>=2: print("DEAD") else: print("SURVIVED")