using System; public class Program { public static void Main() { int[,] count = new int[2, 26]; for (int i = 0; i < 2; i++) { for (int j = 0; j < 26; j++) { count[i, j] = 0; } } for (int i = 0; i < 2; i++) { string str = Console.ReadLine(); for (int j = 0; j < str.Length; j++) { count[i, str[j]-'a']++; } } for (int i = 0; i < 26; i++) { if (count[0, i] != count[1, i]) { Console.WriteLine("NO"); return; } } Console.WriteLine("YES"); } }