import std.stdio; import std.string, std.conv, std.array, std.algorithm; import std.uni, std.math; void main(){ auto A = readln.chomp; auto B = readln.chomp; int[26] cntA, cntB; foreach(a ; A){ cntA[a - 'a']++; } foreach(b ; B){ cntB[b - 'a']++; } string ans = cntA == cntB ? "YES" : "NO"; ans.writeln; }