using System; using System.IO; using System.Linq; namespace yukicore { internal class Program { private static void Main(string[] args) { var n = Console.ReadLine().ToCharArray(); var m = Console.ReadLine().ToCharArray(); Array.Sort(n); Array.Sort(m); if (n== m) Console.WriteLine("YES"); else Console.WriteLine("NO"); } } }