using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ForYukicoder { class Program { static void Main(string[] args) { char[] A = Console.ReadLine().ToArray(); char[] B = Console.ReadLine().ToArray(); bool isMatch = true; Array.Sort(A); Array.Sort(B); for (int i = 0; i < A.Length; i++) { if (A[i] != B[i]) { isMatch = false; break; } } Console.WriteLine(isMatch ? "YES" : "NO"); } } }