fossil = gets.chomp().gsub(".","").to_i chk_ver = gets.chomp().gsub(".","").to_i ans = (chk_ver - fossil) > 0 ? "NO" : "YES" puts ans