#define ll long long #define ffor(i,a,b) for (int i=(a);i<(b);i++) #define rfor(i,a,b) for (int i=(b)-1;i>=(a);i--) #define rep(i,n) for (int i=0;i<(n);i++) #define rrep(i,n) for (int i=(n)-1;i>=0;i--) #include #include #include #include #include #include #include #include #define SIZE 100001 #define MOD 1000000007 #define INF 100000000 using namespace std; int main(){ cin.tie(0); ios::sync_with_stdio(false); string a,b; cin >> a; cin >> b; int n = a.length(); rep(i,n){ rep(j,n){ if(b[i] == a[j]){ a[j] = 'A'; b[i] = 'A'; } } } int flag = 0; rep(i,n){ if(a[i] != 'A'){ flag = 1; break; } else flag = 0; } //rep(i,n) cout << a[i] << endl; cout << ((flag == 1) ? "NO":"YES") << endl; return 0; }