use std::io::*; use std::str::*; const MOD: i32 = 1000000007; fn read() -> Option { let stdin = stdin(); let s = stdin .bytes() .map(|c| c.unwrap() as char) .take_while(|c| !c.is_whitespace()) .collect::(); s.parse::().ok() } fn main() { let d1: u64 = read().unwrap(); let d2: u64 = read().unwrap(); let d3: u64 = read().unwrap(); let s: u64 = read().unwrap(); if s == 1 { println!("SURVIVED"); return; } if d1 + d2 + d3 >= 2 { println!("DEAD"); return; } println!("SURVIVED"); }