#coding:utf-8 get = input() get = get.split(" ") get = list(map(int,get)) sum = get[0] + get[1] + get[2] survive = get[3] if(sum >= 2 and survive != 1): print("DEAD") else: print("SURVIVED")