using System; using System.Collections.Generic; namespace ConsoleApp1 { class Program { static void Main(string[] args) { #if LocalDebug var exStdIn = new System.IO.StreamReader("stdin.txt"); System.Console.SetIn(exStdIn); #endif var Input1 = Console.ReadLine(); var Input2 = Console.ReadLine(); var Result = "YES"; for (int i = 0; i < Input1.Length; i++) { var str = Input1[0].ToString(); var IsExists = Input2.IndexOf(str); if (IsExists > 0) { Input2.Remove(IsExists); } else { Result = "NO"; break; } } Console.WriteLine(Result); #if LocalDebug System.Console.ReadKey(); #endif } static char ShiftRight(char c, int shift) { var a = (char)(c - shift); if (a < 'A') a = (char)('Z' + 1 - ('A' - a)); return a; } static int GetData() { return int.Parse(Console.ReadLine()); } static string[] GetList() { return Console.ReadLine().Split(' '); } } }