using System; namespace yukicoder { class Program { static void Main(string[] args) { string str = Console.ReadLine(); string str1 = Console.ReadLine(); string a = ""; string b = ""; bool f = false; int count = 0; for(int i = 0; i < str.Length; i++) { f = false; a = str.Substring(i, 1); for (int j = 0; j < str1.Length; j++) { b = str1.Substring(j, 1); if (a == b) { str1 = str1.Remove(j, 1); f = true; break; } } if (f == false) { Console.WriteLine("NO"); break; } else if(i==str.Length-1) { Console.WriteLine("YES"); } } } } }