fn main() { let mut xx = String::new(); std::io::Read::read_to_string(&mut std::io::stdin(), &mut xx).ok(); let mut xx = xx.split(['.', '\n']).map(|n| n.parse::().unwrap()); let fossil = (xx.next().unwrap(), xx.next().unwrap(), xx.next().unwrap()); let judged = (xx.next().unwrap(), xx.next().unwrap(), xx.next().unwrap()); if judged <= fossil { println!("YES"); } else { println!("NO"); } }