#include #include #include #include #include using namespace std; int main(void) { char c; vector A, B; while ((c = getchar()) != '\n') { A.push_back(c); } while ((c = getchar()) != '\n') { B.push_back(c); } sort(A.begin(), A.end()); sort(B.begin(), B.end()); if (A == B) { cout << "YES" << endl; } else { cout << "NO" << endl; } }