#include #include void swap(char *c1, char*c2); void alphasort(char str[], int count); int main() { char str1[11]; char str2[11]; int ans; int count = 0; scanf("%s", str1); scanf("%s", str2); while (str1[count]!= '\0') { count++; } alphasort(str1,count); alphasort(str2,count); ans = strcmp(str1, str2); printf("%s\n", (ans == 0 ? "YES" : "NO")); return 0; } void swap(char *c1,char *c2) { char temp; temp = *c1; *c1 = *c2; *c2 = temp; } void alphasort(char str[], int count) { int i, j; for (i = 0; i < count - 1; i++) { for (j = 0; j < count - 1- i; j++) { if ((int)(str[j]) >= (int)(str[j + 1])){ swap(&str[j], &str[j + 1]); } } } }