#include int main() { char a[11],b[11]; int alphaa[26],alphab[26]; int i,count=0; for (i=0;i<26;i++) { alphaa[i]=0; alphab[i]=0; } scanf("%s",a); scanf("%s",b); i=0; while (a[i]!='\0') { alphaa[a[i]-'a']++; alphab[b[i]-'a']++; i++; } for (i=0;i<26;i++) { if (alphaa[i]!=alphab[i]) { count++; break; } } if (count==0) { printf("YES\n"); } else { printf("NO\n"); } return 0; }