#include int stringsoat(char a[]){ int length; for(int i = 0; i < 12; i++){ if(a[i] == '\0'){ length = i; break; } } for(int i = 0; i < length; i++){ int max = 0,maxpoint; for(int j = i; j < length; j++){ if(max < a[j]){ max = a[j]; maxpoint = j; } } char swap = a[i]; a[i] = a[maxpoint]; a[maxpoint] = swap; } return length; } int main(void){ char a[11],b[11],lengthA,lengthB,checker = 1; fgets(a,sizeof(a),stdin); fgets(b,sizeof(b),stdin); lengthA = stringsoat(a); lengthB = stringsoat(b); for(int i = 0; i < lengthA; i++){ if(lengthA != lengthB)break; if(a[i] != b[i])break; if(i == lengthA - 1){ checker = 0; } } if(checker == 1)printf("NO\n"); else printf("YES\n"); return 0; }