using System; using System.Linq; class Program { static void Main() { var A = Console.ReadLine().OrderBy(x => x); var B = Console.ReadLine().OrderBy(x => x); if (A.SequenceEqual(B)) { Console.WriteLine("YES"); } else { Console.WriteLine("NO"); } } }