#include
#include
using namespace std;
#define max 101
int ascii1[128]={0},ascii2[128]={0};
char str1[max], str2[max];
int main()
{
freopen("input.txt","r",stdin);
while(EOF!=scanf("%s",str1))
{
scanf("%s",str2);
for(size_t i=0; i {
ascii1[str1[i]]++;
ascii2[str2[i]]++;
}
sort(ascii1,ascii1+128);
sort(ascii2,ascii2+128);
bool flag = true;
for(size_t i = 0; i<128; ++i)
{
if(ascii1[i]!=ascii2[i])
{
flag = false;
break;
}
}
if(flag)
cout<<"YES"< else
cout<<"NO"< memset(str1,0,max);
memset(str2,0,max);
}
return 0;
}
阅读(1504) | 评论(0) | 转发(0) |