using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace yukicoder { class Program { static void Main(string[] args) { string x = Console.ReadLine(); string y = Console.ReadLine(); int f = 1; for(int i = 0; i < y.Length && f == 1; i++) { f = 0; for (int j =0;j < x.Length && f == 0; j++) { if(x[j] == y[i]) { x = x.Remove(j, 1); j--; f = 1; } } } if (f == 1) { Console.WriteLine("{0}", "YES"); } else { Console.WriteLine("{0}", "NO"); } Console.ReadLine(); } } }