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