using System; using System.IO; using System.Linq; using System.Collections; using System.Collections.Generic; using System.Numerics; using System.Diagnostics; using System.Text; using System.Text.RegularExpressions; using System.Threading.Tasks; using static System.Math; using static System.Console; namespace yukicoder { class Program { static void Main() { var a = Console.ReadLine().ToList(); var b = Console.ReadLine().ToList(); a.Sort(); b.Sort(); if (string.Join("", a).Equals(string.Join("", b))) { Console.WriteLine("YES"); } else { Console.WriteLine("NO"); } } } }