#include #include #include #include using namespace std; int main() { vector v(36, 0); string a, b; cin >> a >> b; for (char c : a) ++v[c - 'a']; for (char c : b) --v[c - 'a']; if (all_of(v.begin(), v.end(), [](int x) { return x == 0; })) { cout << "YES" << endl; } else { cout << "NO" << endl; } return 0; }