using System; using System.Collections.Generic; using System.Linq; public class Program { public static int CalculateMoveCount(int distance, int speed) { int r; var q = Math.DivRem( Math.Abs( distance ), speed, out r ); return r == 0 ? q : q + 1; } public static string Solver(System.IO.TextReader reader) { string a = reader.ReadLine(); string b = reader.ReadLine(); bool isSame = true; for(var i = 0; i != b.Length; ++i) { var n=a.IndexOf( b.ElementAt( i ) ); if (n == -1) { isSame = false; break; } else { a=a.Remove( n, 1 ); } } return isSame?"YES":"NO"; } private static void Main() { Console.WriteLine( Solver( Console.In )); } }