学习别人
!!!
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main()
{
string str1,str2;
while(cin>>str1>>str2)
{
vector<int> a(26,0),b(26,0);
for(char c:str1) a[c-'A']++;
for(char c:str2) b[c-'A']++;
sort(a.begin(),a.end());
sort(b.begin(),b.end());
puts(a==b?"YES":"NO");
}
return 0;
}