#include #include #include #include using namespace std; int main(int argc, char**argv) { string a, b; cin >> a >> b; sort(a.begin(), a.end()); sort(b.begin(), b.end()); if (a==b) { cout << "YES" << endl; } else { cout << "NO" << endl; } return 0; }