n = gets.split("").sort m = gets.split("").sort if (n | m).sort == m puts "YES" else puts "NO" end