#include #include using namespace std; using namespace atcoder; using ll=long long; using ld=long double; using vll=vector; using pll=pair; using mint=modint; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); string A,B; cin>>A>>B; vll f(26,0); for(auto a:A)f[a-'a']++; for(auto b:B)f[b-'a']--; for(auto x:f){ if(x!=0){ cout<<"NO"<