#include using namespace std; int main(int argc, char **argv) { char a[11], b[11]; scanf("%s%s", a, b); sort(a, a + strlen(a)); sort(b, b + strlen(b)); for (int i = 0; i < strlen(a); i++) { if (a[i] != b[i]) { printf("NO\n"); return 0; } } printf("YES\n"); return 0; }