#include int main(void) { int i; char str_a[10]; char str_b[10]; int word_a[26] = {0}; int word_b[26] = {0}; scanf("%s", str_a); scanf("%s", str_b); for ( i = 0; str_a[i] != '\0'; i++ ) { if ('a' <= str_a[i] && str_a[i] <= 'z') { word_a[str_a[i] - 'a']++; } } for ( i = 0; str_b[i] != '\0'; i++ ) { if ('a' <= str_b[i] && str_b[i] <= 'z') { word_b[str_b[i] - 'a']++; } } for ( i = 0; i < 10; i++ ) { if ( word_a[i] != word_b[i] ) { puts("NO"); return 0; } } puts("YES"); return 0; }