#include using namespace std; int main() { string a,b; cin>>a>>b; bool bb[b.length()]={0}; for (int i = 0; i < a.length(); ++i) { for (int j = 0; j < b.length(); ++j) { if(a[i]==b[j] &&bb[j]==0){ bb[j]=1; break; } if(j==b.length()-1){ cout<<"NO"<