use std::io; use std::str::FromStr; fn main() { let stdin = io::stdin(); let mut buf = String::new(); stdin.read_line(&mut buf).ok(); let mut it = buf.split_whitespace().map(|n| String::from_str(n).unwrap()); let a = it.next().unwrap(); let mut buf = String::new(); stdin.read_line(&mut buf).ok(); let mut it = buf.split_whitespace().map(|n| String::from_str(n).unwrap()); let b = it.next().unwrap(); let mut veca = Vec::new(); let mut vecb = Vec::new(); let split_a = a.split("."); let split_b = b.split("."); for aa in split_a { veca.push(aa); } for bb in split_b { vecb.push(bb); } for i in 0..3 { if veca[i] == vecb[i] { continue; } if veca[i] > vecb[i] { println!("YES"); return; } else { println!("NO"); return; } } println!("NO"); }