use std::io::*; fn main() { let mut s: String = String::new(); std::io::stdin().read_to_string(&mut s).ok(); let mut itr = s.trim().split_whitespace(); let a: Vec = itr .next() .unwrap() .split('.') .map(|c| c.to_string().parse().unwrap()) .collect(); let b: Vec = itr .next() .unwrap() .split('.') .map(|c| c.to_string().parse().unwrap()) .collect(); if a[0] != b[0] { if a[0] > b[0] { println!("YES"); } else { println!("NO"); } } else if a[1] != b[1] { if a[1] > b[1] { println!("YES"); } else { println!("NO"); } } else if a[2] != b[2] { if a[2] > b[2] { println!("YES"); } else { println!("NO"); } } else { println!("YES"); } }