#include int main() { char strA[10]; char strB[10]; int flg[26]; int checkFlg = 0; scanf("%s", strA); scanf("%s", strB); for (int i = 0; i < 26; i++) flg[i] = 0; for (int i = 0; strA[i] != '\0'; i++) flg[strA[i] - 'a']++; for (int i = 0; strB[i] != '\0'; i++) flg[strB[i] - 'a']--; for (int i = 0; i < 26; i++) { if (flg[i] != 0) { checkFlg = 1; break; } } if(checkFlg == 0) printf("YES"); else printf("NO"); // 終了コードは0 return 0; }