#include <bits/stdc++.h>
using namespace std;
int main() {
  string s1, s2;
  getline(cin, s1);
  getline(cin, s2);
  for (int i = 0; i < s2.size(); ++i) {
    bool ch = true;
    for (int j = 0; j < s1.size(); ++j) {
      if (s2[i] == s1[j]) {
        ch = false;
        s1[j] = ' ';
        break;
      }
    }
    if (ch) {
      cout << "NO";
      return 0;
    }
    while (s2[i + 1] == ' ') i++;
  }
  cout << "YES";
}
