using System; class Program { static void Main() { char[] s0 = Console.ReadLine().ToCharArray(); char[] s1 = Console.ReadLine().ToCharArray(); Array.Sort(s0); Array.Sort(s1); if(new string(s0) == new string(s1)) { Console.WriteLine($"YES"); } else { Console.WriteLine($"NO"); } } }