using System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Security; using System.Security.Permissions; namespace yukicore { internal class Program { private static void Main() { char[] array = Console.ReadLine().ToCharArray(); char[] array2 = Console.ReadLine().ToCharArray(); Array.Sort(array); Array.Sort(array2); for (int i = 0; i < array.Length; i++) { if (array[i] != array2[i]) { Console.WriteLine("NO"); return; } } Console.WriteLine("YES"); } } }