using System; using System.Linq; class Program { static void Main(string[] args) { char[] A = Console.ReadLine().ToCharArray(); char[] B = Console.ReadLine().ToCharArray(); Array.Sort(A); Array.Sort(B); string strA = new string(A); string strB = new string(B); Console.WriteLine(strA.Equals(strB) ? "YES" : "NO"); } }