using System; using System.Linq; namespace App { class Program { static void Main(string[] args) { var a = Console.ReadLine().OrderBy(x => x).ToArray(); var b = Console.ReadLine().OrderBy(x => x).ToArray(); if (a == b) { Console.WriteLine("YES"); } else { Console.WriteLine("NO"); } } } }