#include using namespace std; #define REP(i,N) for(i=0;i P; typedef struct{ int first; int second; int third; }T; //昇順 bool comp_Se(T& l, T& r){ return l.second < r.second; } int main(void){ string A,B; cin >> A >> B; sort(A.begin(),A.end()); sort(B.begin(),B.end()); if(A==B) cout << "YES" << endl; else cout << "NO" << endl; return 0; }