#include int main(void){ char astr[11]; char bstr[11]; int a[10]; int b[10]; int i, j, w; for( i = 0; i < 10; i++ ){ a[i] = 0; b[i] = 0; } scanf( "%s", astr ); scanf( "%s", bstr ); for( i = 0; i < 10; i++ ){ if( astr[i] == '\0' ){ break; } a[i] = ( int )astr[i]; b[i] = ( int )bstr[i]; } for( i = 0; i < 9; i++ ) { for ( j = i + 1; j < 10; j++ ){ if (a[i] < a[j]) { w = a[i]; a[i] = a[j]; a[j] = w; } if (b[i] < b[j]) { w = b[i]; b[i] = b[j]; b[j] = w; } } } for( i = 0; i < 10; i++ ) { if( a[i] != b[i] ){ printf( "NO\n" ); return( 0 ); } } printf( "YES\n" ); return( 0 ); }