#include <fstream>
#include <algorithm>

using namespace std;

ifstream fin( "ancient.in" );
ofstream fout( "ancient.out" );

const int MAX = 256;

int cnt[MAX];

bool Work()
{
   char s[MAX], *ptr;
   fin >> s;
   for( ptr = s; *ptr; ++ptr )
      ++cnt[*ptr];
   fin >> s;
   for( ptr = s; *ptr; ++ptr )
      --cnt[*ptr];
   int i;
   for( i = 0; i<256; ++i )
      if( cnt[i] )
         return false;
   return true;
}

void Output( bool res )
{
   fout << (res ? "YES" : "NO");
}

int main()
{
   Output( Work() );
   return 0;
}
