using System; public class Program { static void Main() { char[] a = Console.ReadLine().ToCharArray(); char[] b = Console.ReadLine().ToCharArray(); Array.Sort(a); Array.Sort(b); Console.WriteLine(new String(a) == new String(b) ? "YES" : "NO"); } }