n = gets.split("") m = gets.split("") if (n - m).empty? puts "YES" else puts "NO" end