#include <bits/stdc++.h>
using namespace std;
string s1, s2, s3, s4, ans;
bool a[201];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0), cout.tie(0);
  getline(cin, s3);
  getline(cin, s4);
  for (int i = 0; i < s3.length(); i++) {
    if (s3[i] != ' ') s1 += s3[i];
  }
  for (int i = 0; i < s4.length(); i++) {
    if (s4[i] != ' ') s2 += s4[i];
  }
  sort(s1.begin(), s1.end());
  sort(s2.begin(), s2.end());
  for (int i = 0; i < s2.length(); i++) {
    for (int j = 0; j < s1.length(); j++) {
      if (s2[i] == s1[j] and a[j] == 0) {
        ans = "YES";
        a[j] = 1;
        break;
      } else
        ans = "NO";
    }
    if (ans == "NO") {
      cout << ans;
      return 0;
    }
  }
  cout << ans;
  return 0;
}
