fossil = gets.split(".").map(&:to_i) current = gets.split(".").map(&:to_i) if fossil = current puts "YES" return end for i in 0..2 if fossil[i] > current[i] puts "YES" return elsif fossil[i] < current[i] puts "NO" return else next end end