#include <bits/stdc++.h>
using namespace std;
bool isSubsequence(string s1, string s2, int n, int m) {
  if (m == 0) return true;
  if (n == 0) return false;
  if (s1[n - 1] == s2[m - 1]) return isSubsequence(s1, s2, n - 1, m - 1);
  return isSubsequence(s1, s2, n - 1, m);
}
int main() {
  string s1, s2;
  getline(cin, s1);
  getline(cin, s2);
  s1.erase(remove(s1.begin(), s1.end(), ' '), s1.end());
  s2.erase(remove(s2.begin(), s2.end(), ' '), s2.end());
  sort(s1.begin(), s1.end());
  sort(s2.begin(), s2.end());
  if (isSubsequence(s1, s2, s1.size(), s2.size()))
    cout << "YES";
  else
    cout << "NO";
}
