#include #include void sort(char s[]) { char temp; unsigned i, j; unsigned k = strlen(s) - 1; for (i = 0; i < strlen(s) - 1; i++) { for (j = 0; j < k; j++) { if ((unsigned)s[j] > (unsigned)s[j + 1]) { temp = s[j]; s[j] = s[j + 1]; s[j + 1] = temp; } } k--; } } int main(void) { char a[11], b[11]; scanf("%s", a); scanf("%s", b); sort(a); sort(b); if (strcmp(a, b)) puts("NO"); else puts("YES"); return 0; }