#include using namespace std; int main(){ char a[11],b[11]; for(int i = 0; i < 11; i++){ a[i] = 0; b[i] = 0; } cin >> a >> b; sort(a, a + sizeof(a)); sort(b,b+sizeof(b)); for(int i = 0; i < 11; i++){ if(a[i] != b[i]){ cout << "NO" << endl; return 0; } } cout << "YES" << endl; return 0; }