#include <iostream>
#include <string>

using namespace std;
int main(void) {
	size_t counts[26] = { 0 };
	string A, B;
	cin >> A;
	cin >> B;
	for (char const& c : A) {
		counts[c-'a'] ++;
	}

	bool ok = true;
	for (char const& c : B) {
		if (counts[c-'a'] == 0) {
			ok = false;
			break;
		}
		else {
			counts[c-'a']--;
		}
	}

	for (auto &c : counts) {
		if (c > 0) {
			ok = false;
			break;
		}
	}

	cout << (ok ? "YES" : "NO") << endl;
	return 0;
}